]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Move this macro inside the function (no need for larger scope)
authorSamual Lenks <samual@xonotic.org>
Sat, 29 Sep 2012 02:16:33 +0000 (22:16 -0400)
committerSamual Lenks <samual@xonotic.org>
Sat, 29 Sep 2012 02:16:33 +0000 (22:16 -0400)
qcsrc/common/notifications.qc

index 16f4948c2b352cd445f729d4d960dfd7bef1b1fa..f5f3e742819f7426404e974f84b731f09bc4c99e 100644 (file)
@@ -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;
 }