From 656a2a16a3117c1447074e41ca9882d5f7b66005 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 18 Oct 2014 23:00:56 -0400 Subject: [PATCH] TASInputDlg: Pass string by reference for CreateStickLayout Also handles strings passed to it correctly. --- Source/Core/DolphinWX/TASInputDlg.cpp | 10 +++++----- Source/Core/DolphinWX/TASInputDlg.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Source/Core/DolphinWX/TASInputDlg.cpp b/Source/Core/DolphinWX/TASInputDlg.cpp index 078d349681..da25895574 100644 --- a/Source/Core/DolphinWX/TASInputDlg.cpp +++ b/Source/Core/DolphinWX/TASInputDlg.cpp @@ -102,7 +102,7 @@ void TASInputDlg::CreateWiiLayout() m_controls[8] = &m_z_cont; m_main_stick = CreateStick(ID_MAIN_STICK); - wxStaticBoxSizer* const main_stick = CreateStickLayout(&m_main_stick, "IR"); + wxStaticBoxSizer* const main_stick = CreateStickLayout(&m_main_stick, _("IR")); m_main_stick.x_cont.default_value = 512; m_main_stick.y_cont.default_value = 384; @@ -189,10 +189,10 @@ void TASInputDlg::CreateGCLayout() wxBoxSizer* const top_box = new wxBoxSizer(wxHORIZONTAL); wxBoxSizer* const bottom_box = new wxBoxSizer(wxHORIZONTAL); m_main_stick = CreateStick(ID_MAIN_STICK); - wxStaticBoxSizer* const main_box = CreateStickLayout(&m_main_stick, "Main Stick"); + wxStaticBoxSizer* const main_box = CreateStickLayout(&m_main_stick, _("Main Stick")); m_c_stick = CreateStick(ID_C_STICK); - wxStaticBoxSizer* const c_box = CreateStickLayout(&m_c_stick, "C Stick"); + wxStaticBoxSizer* const c_box = CreateStickLayout(&m_c_stick, _("C Stick")); wxStaticBoxSizer* const shoulder_box = new wxStaticBoxSizer(wxHORIZONTAL, this, _("Shoulder Buttons")); m_l_cont = CreateControl(wxSL_VERTICAL | wxSL_INVERSE, -1, 100); @@ -281,9 +281,9 @@ TASInputDlg::Stick TASInputDlg::CreateStick(int id_stick) return tempStick; } -wxStaticBoxSizer* TASInputDlg::CreateStickLayout(Stick* tempStick, std::string title) +wxStaticBoxSizer* TASInputDlg::CreateStickLayout(Stick* tempStick, const wxString& title) { - wxStaticBoxSizer* const temp_box = new wxStaticBoxSizer(wxHORIZONTAL, this, _(title)); + wxStaticBoxSizer* const temp_box = new wxStaticBoxSizer(wxHORIZONTAL, this, title); wxBoxSizer* const temp_xslider_box = new wxBoxSizer(wxHORIZONTAL); wxBoxSizer* const temp_yslider_box = new wxBoxSizer(wxVERTICAL); wxBoxSizer* const temp_stick_box = new wxBoxSizer(wxVERTICAL); diff --git a/Source/Core/DolphinWX/TASInputDlg.h b/Source/Core/DolphinWX/TASInputDlg.h index 93c2e6b809..4ef4f1091e 100644 --- a/Source/Core/DolphinWX/TASInputDlg.h +++ b/Source/Core/DolphinWX/TASInputDlg.h @@ -95,7 +95,7 @@ class TASInputDlg : public wxDialog void SetButtonValue(Button* button, bool CurrentState); void SetSliderValue(Control* control, int CurrentValue, int defaultValue = 128); Stick CreateStick(int id_stick); - wxStaticBoxSizer* CreateStickLayout(Stick* tempStick, std::string title); + wxStaticBoxSizer* CreateStickLayout(Stick* tempStick, const wxString& title); Button CreateButton(const std::string& name); Control CreateControl(long style, int width, int height, u32 range = 255);