projects
/
xonotic
/
xonotic-data.pk3dir.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c5155e5
)
Add CONSTRUCT for super-initialization
author
TimePath <andrew.hardaker1995@gmail.com>
Fri, 14 Aug 2015 00:10:51 +0000
(10:10 +1000)
committer
TimePath <andrew.hardaker1995@gmail.com>
Fri, 14 Aug 2015 00:10:51 +0000
(10:10 +1000)
qcsrc/common/oo.qh
patch
|
blob
|
history
diff --git
a/qcsrc/common/oo.qh
b/qcsrc/common/oo.qh
index 1485d4da4067ad2466010821fe6cc542c65ac617..aa660ab15d96de375fd87d11c374d6088840ec48 100644
(file)
--- a/
qcsrc/common/oo.qh
+++ b/
qcsrc/common/oo.qh
@@
-43,6
+43,9
@@
entity __spawn(string _classname, string _sourceFile, int _sourceLine) {
#define NEW(cname, ...) \
OVERLOAD(spawn##cname, new(cname), ##__VA_ARGS__)
+#define CONSTRUCT(cname, ...) \
+ OVERLOAD(spawn##cname, this, ##__VA_ARGS__)
+
#define CONSTRUCTOR(cname, ...) \
cname OVERLOAD(spawn##cname, cname this, __VA_ARGS__)