diff options
| author | Lioncash <mathew1800@gmail.com> | 2015-08-27 08:12:34 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2015-08-27 08:36:01 -0400 |
| commit | 7fa0ecd046d2c9d6b63d958ea97bd33ccb776ea9 (patch) | |
| tree | cf3862888b3ba9514ff090e802522d4cb9ae8a68 /Source/Core/DolphinWX/Main.cpp | |
| parent | 14ae1d23cf9cc67cf88074420b98ef6a0910b75f (diff) | |
Main: Make the wxLocale class member a unique_ptr
Diffstat (limited to 'Source/Core/DolphinWX/Main.cpp')
| -rw-r--r-- | Source/Core/DolphinWX/Main.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Source/Core/DolphinWX/Main.cpp b/Source/Core/DolphinWX/Main.cpp index a4d223ad95..c75e53b976 100644 --- a/Source/Core/DolphinWX/Main.cpp +++ b/Source/Core/DolphinWX/Main.cpp @@ -314,7 +314,7 @@ void DolphinApp::InitLanguageSupport() // Load language if possible, fall back to system default otherwise if (wxLocale::IsAvailable(language)) { - m_locale = new wxLocale(language); + m_locale.reset(new wxLocale(language)); // Specify where dolphins *.gmo files are located on each operating system #ifdef _WIN32 @@ -330,14 +330,13 @@ void DolphinApp::InitLanguageSupport() if (!m_locale->IsOk()) { wxMessageBox(_("Error loading selected language. Falling back to system default."), _("Error")); - delete m_locale; - m_locale = new wxLocale(wxLANGUAGE_DEFAULT); + m_locale.reset(new wxLocale(wxLANGUAGE_DEFAULT)); } } else { wxMessageBox(_("The selected language is not supported by your system. Falling back to system default."), _("Error")); - m_locale = new wxLocale(wxLANGUAGE_DEFAULT); + m_locale.reset(new wxLocale(wxLANGUAGE_DEFAULT)); } } @@ -355,8 +354,6 @@ int DolphinApp::OnExit() Core::Shutdown(); UICommon::Shutdown(); - delete m_locale; - return wxApp::OnExit(); } |
