]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/maplist.qc
micro-optimization chore: in for-loops change all post-{in,de}crements to pre-{in...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / maplist.qc
index 1fa065874554ce666fa883884d2347359d076bf0..89748e85c3647dda4ac36afc3c06e08e83f3a166 100644 (file)
@@ -80,7 +80,7 @@ void XonoticMapList_draw(entity me)
 {
        if(me.startButton)
                me.startButton.disabled = ((me.selectedItem < 0) || (me.selectedItem >= me.nItems)
-                       || (gamestatus & (GAME_ISSERVER | GAME_CONNECTED) && cvar("g_campaign")));
+                       || ((gamestatus & (GAME_ISSERVER | GAME_CONNECTED)) && cvar("g_campaign")));
        SUPER(XonoticMapList).draw(me);
 }
 
@@ -234,7 +234,7 @@ void MapList_Add_Shown(entity btn, entity me)
 {
        float i, n;
        n = strlen(me.g_maplistCache);
-       for (i = 0 ; i < n; i++)
+       for (i = 0 ; i < n; ++i)
        {
                if (!me.g_maplistCacheQuery(me, i))
                        me.g_maplistCacheToggle(me, i);
@@ -246,7 +246,7 @@ void MapList_Remove_Shown(entity btn, entity me)
 {
        float i, n;
        n = strlen(me.g_maplistCache);
-       for (i = 0 ; i < n; i++)
+       for (i = 0 ; i < n; ++i)
        {
                if (me.g_maplistCacheQuery(me, i))
                        me.g_maplistCacheToggle(me, i);