From: Rudolf Polzer Date: Fri, 18 Oct 2013 00:38:07 +0000 (+0200) Subject: Simpler function accumulation. Thanks, graphitemaster. X-Git-Tag: xonotic-v0.8.0~277 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4f75649e4025f6af2730b0625b733a74944b02e7;p=xonotic%2Fxonotic-data.pk3dir.git Simpler function accumulation. Thanks, graphitemaster. --- diff --git a/qcsrc/client/progs.src b/qcsrc/client/progs.src index 114f0a5b5..fa61033f6 100644 --- a/qcsrc/client/progs.src +++ b/qcsrc/client/progs.src @@ -121,5 +121,3 @@ tturrets.qc player_skeleton.qc ../common/animdecide.qc - -../common/if-this-file-errors-scroll-up-and-fix-the-warnings.fteqccfail diff --git a/qcsrc/common/if-this-file-errors-scroll-up-and-fix-the-warnings.fteqccfail b/qcsrc/common/if-this-file-errors-scroll-up-and-fix-the-warnings.fteqccfail deleted file mode 100644 index e69de29bb..000000000 diff --git a/qcsrc/common/util.qh b/qcsrc/common/util.qh index d575bbfdd..166af391e 100644 --- a/qcsrc/common/util.qh +++ b/qcsrc/common/util.qh @@ -6,6 +6,12 @@ // a dummy macro that prevents the "hanging ;" warning #define ENDS_WITH_CURLY_BRACE +#ifdef GMQCC +# define ACCUMULATE_FUNCTION(func,otherfunc) \ + [[accumulate]] void func() { otherfunc(); } +# define CALL_ACCUMULATED_FUNCTION(func) \ + func() +#else #ifdef HAVE_YO_DAWG_CPP // TODO make ascii art pic of xzibit // YO DAWG! @@ -41,6 +47,7 @@ void ACCUMULATE_call(string func) # define CALL_ACCUMULATED_FUNCTION(func) \ ACCUMULATE_call(#func) #endif +#endif // used for simplifying ACCUMULATE_FUNCTIONs #define SET_FIRST_OR_LAST(input,first,count) if(!input) { input = (first + count); } diff --git a/qcsrc/menu/progs.src b/qcsrc/menu/progs.src index 3036278c1..4900b9d96 100644 --- a/qcsrc/menu/progs.src +++ b/qcsrc/menu/progs.src @@ -54,5 +54,3 @@ xonotic/util.qc ../common/urllib.qc ../warpzonelib/mathlib.qc - -../common/if-this-file-errors-scroll-up-and-fix-the-warnings.fteqccfail diff --git a/qcsrc/server/progs.src b/qcsrc/server/progs.src index e9e9a4b8c..8980f7759 100644 --- a/qcsrc/server/progs.src +++ b/qcsrc/server/progs.src @@ -269,5 +269,3 @@ mutators/mutator_campcheck.qc ../common/test.qc ../common/util.qc ../common/notifications.qc - -../common/if-this-file-errors-scroll-up-and-fix-the-warnings.fteqccfail