From: TimePath Date: Tue, 12 May 2015 07:07:27 +0000 (+1000) Subject: Move LAMBDA X-Git-Tag: xonotic-v0.8.1~53^2~11 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b4f102739614462525a8559e42845229fee3eba2;p=xonotic%2Fxonotic-data.pk3dir.git Move LAMBDA --- diff --git a/qcsrc/common/items/item.qh b/qcsrc/common/items/item.qh index 1c8939beb..0434a4629 100644 --- a/qcsrc/common/items/item.qh +++ b/qcsrc/common/items/item.qh @@ -7,8 +7,6 @@ ENDCLASS(GameItem) -#define LAMBDA(...) { __VA_ARGS__ ; } - #define ITEM_SIGNALS(_) \ _(Default, void, (entity it), LAMBDA({ it.respondTo(it, SIGNAL); })) \ /* Common item signals */ diff --git a/qcsrc/common/util-pre.qh b/qcsrc/common/util-pre.qh index 45a373022..053261b10 100644 --- a/qcsrc/common/util-pre.qh +++ b/qcsrc/common/util-pre.qh @@ -58,6 +58,8 @@ #define OVERLOAD(F, ...) OVERLOAD_(F,__VA_ARGS__,9,8,7,6,5,4,3,2,1)(__VA_ARGS__) #endif +#define LAMBDA(...) { __VA_ARGS__ ; } + #define MAP(f, ...) OVERLOAD(MAP, f, __VA_ARGS__) #define MAP_2(f, it) f(it) #define MAP_3(f, it, ...) f(it)MAP_2(f, __VA_ARGS__)