From: terencehill Date: Thu, 26 Nov 2015 10:33:55 +0000 (+0100) Subject: Remove 2 useless strzone calls; also clear 2 unzoned strings X-Git-Tag: xonotic-v0.8.2~1575^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=refs%2Fmerge-requests%2F261%2Fhead;p=xonotic%2Fxonotic-data.pk3dir.git Remove 2 useless strzone calls; also clear 2 unzoned strings --- diff --git a/qcsrc/menu/command/menu_cmd.qc b/qcsrc/menu/command/menu_cmd.qc index 46f7f9a91..eedb59eca 100644 --- a/qcsrc/menu/command/menu_cmd.qc +++ b/qcsrc/menu/command/menu_cmd.qc @@ -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; } diff --git a/qcsrc/menu/xonotic/serverlist.qc b/qcsrc/menu/xonotic/serverlist.qc index 1450e8ff7..5bfdb8d63 100644 --- a/qcsrc/menu/xonotic/serverlist.qc +++ b/qcsrc/menu/xonotic/serverlist.qc @@ -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)