From 4f4feade2c2e47abd5817131b4f3b6f300df04ec Mon Sep 17 00:00:00 2001 From: Samual Lenks Date: Fri, 28 Sep 2012 22:16:33 -0400 Subject: [PATCH] Move this macro inside the function (no need for larger scope) --- qcsrc/common/notifications.qc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) 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; } -- 2.39.2