]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove 2 useless strzone calls; also clear 2 unzoned strings 261/head
authorterencehill <piuntn@gmail.com>
Thu, 26 Nov 2015 10:33:55 +0000 (11:33 +0100)
committerterencehill <piuntn@gmail.com>
Thu, 26 Nov 2015 10:33:55 +0000 (11:33 +0100)
qcsrc/menu/command/menu_cmd.qc
qcsrc/menu/xonotic/serverlist.qc

index 46f7f9a9171f3eba41160375fce1fc9890d05f21..eedb59ecaf2c5a88e94c9b4db36120752a79417b 100644 (file)
@@ -72,7 +72,7 @@ void GameCommand(string theCommand)
        if (argv(0) == "directmenu" || argv(0) == "directpanelhudmenu")
        {
                string filter = string_null;
-               if (argv(0) == "directpanelhudmenu") filter = strzone("HUD");
+               if (argv(0) == "directpanelhudmenu") filter = "HUD";
 
                if (argc == 1)
                {
@@ -94,7 +94,6 @@ void GameCommand(string theCommand)
                        m_play_click_sound(MENU_SOUND_OPEN);
                        m_goto(strcat(filter, argv(1))); // switch to a menu item
                }
-               if (filter) strunzone(filter);
                return;
        }
 
index 1450e8ff78e020033032b1dfa59a4d314e2aec8f..5bfdb8d63b7d11873409bfc17324b0ed772beb08 100644 (file)
@@ -177,7 +177,7 @@ void RegisterSLCategories()
                SET_FIELD_COUNT(name, CATEGORY_FIRST, category_ent_count) \
                CHECK_MAX_COUNT(name, MAX_CATEGORIES, category_ent_count, "SLIST_CATEGORY") \
                cat = categories[name - 1] = new(slist_category); \
-               cat.cat_name = strzone(#name); \
+               cat.cat_name = #name; \
                cat.cat_enoverride_string = strzone(SLIST_CATEGORY_AUTOCVAR(name)); \
                cat.cat_dioverride_string = strzone(dioverride); \
                cat.cat_string = strzone(str);
@@ -202,6 +202,7 @@ void RegisterSLCategories()
                                if(catnum) \
                                { \
                                        strunzone(categories[i].override_string); \
+                                       categories[i].override_string = string_null; \
                                        categories[i].override_field = catnum; \
                                        continue; \
                                } \
@@ -215,6 +216,7 @@ void RegisterSLCategories()
                                } \
                        } \
                        strunzone(categories[i].override_string); \
+                       categories[i].override_string = string_null; \
                        categories[i].override_field = 0; \
                }
        PROCESS_OVERRIDE(cat_enoverride_string, cat_enoverride)