-#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;
{ \
assert(this); \
} \
- if (!this.sourceLocFile) \
+ if (!this.sourceLoc) \
{ \
- this.sourceLocFile = __FILE__; \
- this.sourceLocLine = __LINE__; \
+ this.sourceLoc = __FILE__ ":" STR(__LINE__); \
} \
if (!this.spawnfunc_checked) \
{ \
#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) \
/**/
#define spawnfunc(...) EVAL_spawnfunc(OVERLOAD(spawnfunc, __VA_ARGS__))
#define EVAL_spawnfunc(...) __VA_ARGS__
-
-#endif