Replace wxLocale::ms_languagesDB dynamic array with a wxVector

There is no reason to use the macro-based classes for this array as
there are no compatibility constraints here, so use a simple vector
instead.

Note that we need an extra boolean variable now that we don't use a
pointer because we can't just check whether the vector is empty, as this
would return in infinite recursion when InitLanguagesDB() calls
AddLanguage() which, in turn, calls CreateLanguagesDB().
This commit is contained in:
Vadim Zeitlin
2021-08-31 17:37:13 +02:00
parent 5bf11d94a7
commit e92da29272
2 changed files with 28 additions and 30 deletions

View File

@@ -35,7 +35,6 @@
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_FWD_BASE wxLocale;
class WXDLLIMPEXP_FWD_BASE wxLanguageInfoArray;
// ============================================================================
// locale support
@@ -285,8 +284,6 @@ private:
wxTranslations m_translations;
static wxLanguageInfoArray *ms_languagesDB;
wxDECLARE_NO_COPY_CLASS(wxLocale);
};