]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/util.qc
Some minor cleanups and optimizations
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / util.qc
index e994491121a8ae1bf012f6981d7c8fdbc1a7a465..7340564126e52d7fb49b8aec751b583f08b14e1c 100644 (file)
@@ -702,7 +702,7 @@ float updateCompression()
 Gametype GameType_GetID(int cnt)
 {
        int i = 0;
-       #define GAMETYPE(it) { if (i++ == cnt) return it; }
+       #define GAMETYPE(it) if (i++ == cnt) return it;
        GAMETYPES
        HIDDEN_GAMETYPES
        #undef GAMETYPE
@@ -712,10 +712,11 @@ Gametype GameType_GetID(int cnt)
 int GameType_GetCount()
 {
        int i = 0;
+       int dev = cvar("developer");
        #define GAMETYPE(id) ++i;
        GAMETYPES
        #undef GAMETYPE
-       #define GAMETYPE(it) if (cvar("developer")) ++i;
+       #define GAMETYPE(it) if (dev) ++i;
        HIDDEN_GAMETYPES
        #undef GAMETYPE
        return i;