Use wxString() instead of "" for empty strings
This will allow this code to work even when implicit conversion from "const char*" is disabled in wxString and is already marginally more efficient even now. See https://github.com/wxWidgets/wxWidgets/pull/782
This commit is contained in:
committed by
Vadim Zeitlin
parent
e905b94436
commit
8d02384792
@@ -1456,7 +1456,7 @@ void wxTranslations::SetLoader(wxTranslationsLoader *loader)
|
||||
void wxTranslations::SetLanguage(wxLanguage lang)
|
||||
{
|
||||
if ( lang == wxLANGUAGE_DEFAULT )
|
||||
SetLanguage("");
|
||||
SetLanguage(wxString());
|
||||
else
|
||||
SetLanguage(wxLocale::GetLanguageCanonicalName(lang));
|
||||
}
|
||||
@@ -1926,7 +1926,7 @@ wxArrayString wxFileTranslationsLoader::GetAvailableTranslations(const wxString&
|
||||
continue;
|
||||
|
||||
wxString lang;
|
||||
for ( bool ok = dir.GetFirst(&lang, "", wxDIR_DIRS);
|
||||
for ( bool ok = dir.GetFirst(&lang, wxString(), wxDIR_DIRS);
|
||||
ok;
|
||||
ok = dir.GetNext(&lang) )
|
||||
{
|
||||
|
Reference in New Issue
Block a user