From 263d161d268a49e5b123b304959bd128db1c90d3 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Tue, 26 Jul 2011 20:26:09 +0000 Subject: [PATCH] Don't pointlessly store a copy of the default hotkeys json in memory Originally committed to SVN as r5510. --- aegisub/libaegisub/common/hotkey.cpp | 3 +-- aegisub/libaegisub/include/libaegisub/hotkey.h | 1 - aegisub/src/preferences.cpp | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/aegisub/libaegisub/common/hotkey.cpp b/aegisub/libaegisub/common/hotkey.cpp index 0ae3dfc53..be9e345a3 100644 --- a/aegisub/libaegisub/common/hotkey.cpp +++ b/aegisub/libaegisub/common/hotkey.cpp @@ -70,11 +70,10 @@ Hotkey::~Hotkey() { Hotkey::Hotkey(const std::string &file, const std::string &default_config) : config_file(file) -, config_default(default_config) { LOG_D("hotkey/init") << "Generating hotkeys."; - json::UnknownElement hotkey_root = agi::json_util::file(config_file, config_default); + json::UnknownElement hotkey_root = agi::json_util::file(config_file, default_config); json::Object object = hotkey_root; for (json::Object::const_iterator index(object.Begin()); index != object.End(); index++) { diff --git a/aegisub/libaegisub/include/libaegisub/hotkey.h b/aegisub/libaegisub/include/libaegisub/hotkey.h index 170bb0b65..1a8046471 100644 --- a/aegisub/libaegisub/include/libaegisub/hotkey.h +++ b/aegisub/libaegisub/include/libaegisub/hotkey.h @@ -118,7 +118,6 @@ private: HotkeyMap str_map; ///< String representation -> Combo HotkeyMap cmd_map; ///< Command name -> Combo const std::string config_file; ///< Default user config location. - const std::string config_default; ///< Default config. /// Build hotkey map. /// @param context Context being parsed. diff --git a/aegisub/src/preferences.cpp b/aegisub/src/preferences.cpp index cc6e3aa9d..bcca09b54 100644 --- a/aegisub/src/preferences.cpp +++ b/aegisub/src/preferences.cpp @@ -209,7 +209,6 @@ Interface_Colours::Interface_Colours(wxTreebook *book, Preferences *parent): Opt /// Interface Hotkeys preferences subpage Interface_Hotkeys::Interface_Hotkeys(wxTreebook *book, Preferences *parent): OptionPage(book, parent, _("Hotkeys"), PAGE_SUB) { - wxFlexGridSizer *hotkeys = PageSizer(_("Hotkeys")); hotkeys->Add(new wxStaticText(this, wxID_ANY, _T("To be added after hotkey rewrite.")), 0, wxALL, 5); SetSizerAndFit(sizer);