]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove VAR_TO_TEXT
authorSamual Lenks <samual@xonotic.org>
Mon, 4 Mar 2013 20:14:58 +0000 (15:14 -0500)
committerSamual Lenks <samual@xonotic.org>
Mon, 4 Mar 2013 20:14:58 +0000 (15:14 -0500)
qcsrc/common/util.qh

index eb2713864d7d62e146dafa5829c4665b39c1b6a4..8532eff7054121057edb964a4afc3aaea30d596a 100644 (file)
@@ -1,9 +1,6 @@
 // a dummy macro that prevents the "hanging ;" warning
 #define ENDS_WITH_CURLY_BRACE
 
-// return the actual code name of a var as a string
-#define VAR_TO_TEXT(var) #var
-
 #ifdef HAVE_YO_DAWG_CPP
 // TODO make ascii art pic of xzibit
 // YO DAWG!
@@ -43,7 +40,7 @@ void ACCUMULATE_call(string func)
 // used for simplifying ACCUMULATE_FUNCTIONs
 #define SET_FIRST_OR_LAST(input,first,count) if(!input) { input = (first + count); }
 #define SET_FIELD_COUNT(field,first,count) if(!field) { field = (first + count); ++count; }
-#define CHECK_MAX_COUNT(name,max,count,type) if(count == max) { error(strcat("Maximum ", type, " hit: ", VAR_TO_TEXT(name), ": ", ftos(count), ".\n")); }
+#define CHECK_MAX_COUNT(name,max,count,type) if(count == max) { error(strcat("Maximum ", type, " hit: ", #name, ": ", ftos(count), ".\n")); }
 
 // this returns a tempstring containing a copy of s with additional \n newlines added, it also replaces \n in the text with a real newline
 // NOTE: s IS allowed to be a tempstring