]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/lib/spawnfunc.qh
CI: remove build artifacts
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / spawnfunc.qh
index ce3c512c1d4cbed378fd2e9397a2356836e7ac7a..f9c056fbd3ab81e30321f673010bd2da0db064b9 100644 (file)
@@ -1,5 +1,4 @@
-#ifndef SPAWNFUNC_H
-#define SPAWNFUNC_H
+#pragma once
 
 /** If this global exists, only functions with spawnfunc_ name prefix qualify as spawn functions */
 noref bool require_spawnfunc_prefix;
@@ -46,10 +45,9 @@ noref bool require_spawnfunc_prefix;
                        { \
                                assert(this); \
                        } \
-                       if (!this.sourceLocFile) \
+                       if (!this.sourceLoc) \
                        { \
-                               this.sourceLocFile = __FILE__; \
-                               this.sourceLocLine = __LINE__; \
+                               this.sourceLoc = __FILE__ ":" STR(__LINE__); \
                        } \
                        if (!this.spawnfunc_checked) \
                        { \
@@ -84,8 +82,7 @@ noref bool require_spawnfunc_prefix;
 
        #define FIELDS_COMMON(fld) \
                FIELD_SCALAR(fld, classname) \
-               FIELD_SCALAR(fld, sourceLocFile) \
-               FIELD_SCALAR(fld, sourceLocLine) \
+               FIELD_SCALAR(fld, sourceLoc) \
                FIELD_SCALAR(fld, spawnfunc_checked) \
                FIELD_VEC(fld, origin) \
                /**/
@@ -195,5 +192,3 @@ noref bool require_spawnfunc_prefix;
 
        #define spawnfunc(...) EVAL_spawnfunc(OVERLOAD(spawnfunc, __VA_ARGS__))
        #define EVAL_spawnfunc(...) __VA_ARGS__
-
-#endif