]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add CONSTRUCT for super-initialization
authorTimePath <andrew.hardaker1995@gmail.com>
Fri, 14 Aug 2015 00:10:51 +0000 (10:10 +1000)
committerTimePath <andrew.hardaker1995@gmail.com>
Fri, 14 Aug 2015 00:10:51 +0000 (10:10 +1000)
qcsrc/common/oo.qh

index 1485d4da4067ad2466010821fe6cc542c65ac617..aa660ab15d96de375fd87d11c374d6088840ec48 100644 (file)
@@ -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__)