From: TimePath Date: Fri, 14 Aug 2015 00:10:51 +0000 (+1000) Subject: Add CONSTRUCT for super-initialization X-Git-Tag: xonotic-v0.8.2~2073^3~2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=833a792349ec742031c228d5ec9aeb2c6826ec9b;p=xonotic%2Fxonotic-data.pk3dir.git Add CONSTRUCT for super-initialization --- diff --git a/qcsrc/common/oo.qh b/qcsrc/common/oo.qh index 1485d4da4..aa660ab15 100644 --- 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__)