Remove unnecessary TempLocaleSetter::m_localeId
We don't need to store this string, we don't need it after the ctor. Also change the default value of an argument of wxString reference type to be a wxString, not a const char*.
This commit is contained in:
parent
db588c53f2
commit
fe88494966
@ -41,11 +41,12 @@ namespace
|
|||||||
class TempLocaleSetter
|
class TempLocaleSetter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit TempLocaleSetter(int localeCategory, const wxString& localeId = "")
|
explicit TempLocaleSetter(int localeCategory,
|
||||||
: m_localeCategory(localeCategory), m_localeId(localeId),
|
const wxString& localeId = wxString())
|
||||||
|
: m_localeCategory(localeCategory),
|
||||||
m_localeOrig(strdup(setlocale(localeCategory, NULL)))
|
m_localeOrig(strdup(setlocale(localeCategory, NULL)))
|
||||||
{
|
{
|
||||||
setlocale(localeCategory, m_localeId.mb_str());
|
setlocale(localeCategory, localeId.mb_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
~TempLocaleSetter()
|
~TempLocaleSetter()
|
||||||
@ -56,7 +57,6 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
const int m_localeCategory;
|
const int m_localeCategory;
|
||||||
wxString m_localeId;
|
|
||||||
char* const m_localeOrig;
|
char* const m_localeOrig;
|
||||||
|
|
||||||
wxDECLARE_NO_COPY_CLASS(TempLocaleSetter);
|
wxDECLARE_NO_COPY_CLASS(TempLocaleSetter);
|
||||||
|
Loading…
Reference in New Issue
Block a user