From: Samual Lenks Date: Sat, 29 Sep 2012 02:16:33 +0000 (-0400) Subject: Move this macro inside the function (no need for larger scope) X-Git-Tag: xonotic-v0.7.0~62^2~23^2~400 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4f4feade2c2e47abd5817131b4f3b6f300df04ec;p=xonotic%2Fxonotic-data.pk3dir.git Move this macro inside the function (no need for larger scope) --- diff --git a/qcsrc/common/notifications.qc b/qcsrc/common/notifications.qc index 16f4948c2..f5f3e7428 100644 --- a/qcsrc/common/notifications.qc +++ b/qcsrc/common/notifications.qc @@ -191,16 +191,16 @@ float notif_floatcount(float f1, float f2, float f3) return floatcount; } -#define GET_FIELD_VALUE_OUTPUT(field,name,strnum,flnum) \ - if(field == F_NAME) { output = VAR_TO_TEXT(name); } \ - else if(field == F_STRNUM) { output = ftos(strnum); } \ - else if(field == F_FLNUM) { output = ftos(flnum); } - // get the actual name of a notification and return it as a string string Get_Field_Value(float field, float net_type, float net_name) { string output; + #define GET_FIELD_VALUE_OUTPUT(field,name,strnum,flnum) \ + if(field == F_NAME) { output = VAR_TO_TEXT(name); } \ + else if(field == F_STRNUM) { output = ftos(strnum); } \ + else if(field == F_FLNUM) { output = ftos(flnum); } + switch(net_type) { case MSG_INFO: @@ -225,7 +225,8 @@ string Get_Field_Value(float field, float net_type, float net_name) break; } } - + + #undef GET_FIELD_VALUE_OUTPUT return output; }