From 4d32fd481c60eb0847cb809c54a383bd1771f56a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 4 Sep 2021 20:08:58 +0200 Subject: [PATCH] Move wxLocaleIdent implementation out of line No real changes, just don't make all wxLocaleIdent setters inline, this is not necessary as none of these methods are performance-critical. This commit is best viewed with --color-moved git option. --- include/wx/uilocale.h | 32 ++++++-------------------------- src/common/uilocale.cpp | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 26 deletions(-) diff --git a/include/wx/uilocale.h b/include/wx/uilocale.h index 1341dd4d00..9e052c6fe6 100644 --- a/include/wx/uilocale.h +++ b/include/wx/uilocale.h @@ -45,39 +45,19 @@ public: } // Set language - wxLocaleIdent& Language(const wxString& language) - { - m_language = language; - return *this; - } + wxLocaleIdent& Language(const wxString& language); // Set region - wxLocaleIdent& Region(const wxString& region) - { - m_region = region; - return *this; - } + wxLocaleIdent& Region(const wxString& region); - // Set script (not supported under Unix) - wxLocaleIdent& Script(const wxString& script) - { - m_script = script; - return *this; - } + // Set script (not supported and ignored under Unix) + wxLocaleIdent& Script(const wxString& script); // Set charset (only supported under Unix) - wxLocaleIdent& Charset(const wxString& charset) - { - m_charset = charset; - return *this; - } + wxLocaleIdent& Charset(const wxString& charset); // Set modifier (only supported under Unix) - wxLocaleIdent& Modifier(const wxString& modifier) - { - m_modifier = modifier; - return *this; - } + wxLocaleIdent& Modifier(const wxString& modifier); // Accessors for the individual fields. const wxString& GetLanguage() const { return m_language; } diff --git a/src/common/uilocale.cpp b/src/common/uilocale.cpp index cb3f115518..1ce2d9f780 100644 --- a/src/common/uilocale.cpp +++ b/src/common/uilocale.cpp @@ -41,6 +41,44 @@ wxUILocale wxUILocale::ms_current; // implementation // ============================================================================ +// ---------------------------------------------------------------------------- +// wxLocaleIdent +// ---------------------------------------------------------------------------- + +wxLocaleIdent& wxLocaleIdent::Language(const wxString& language) +{ + m_language = language; + return *this; +} + +wxLocaleIdent& wxLocaleIdent::Region(const wxString& region) +{ + m_region = region; + return *this; +} + +wxLocaleIdent& wxLocaleIdent::Script(const wxString& script) +{ + m_script = script; + return *this; +} + +wxLocaleIdent& wxLocaleIdent::Charset(const wxString& charset) +{ + m_charset = charset; + return *this; +} + +wxLocaleIdent& wxLocaleIdent::Modifier(const wxString& modifier) +{ + m_modifier = modifier; + return *this; +} + +// ---------------------------------------------------------------------------- +// wxUILocale +// ---------------------------------------------------------------------------- + #ifndef __WINDOWS__ /* static */