X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ff1bd293e1f57ceea2888fef99b6fb8c5e7f99e0..855f31ebe72bef834a32df2c274b41fb282ad265:/src/common/intl.cpp diff --git a/src/common/intl.cpp b/src/common/intl.cpp index 4be838e417..95eb80b3e1 100644 --- a/src/common/intl.cpp +++ b/src/common/intl.cpp @@ -18,12 +18,6 @@ // headers // ---------------------------------------------------------------------------- -#if defined(__BORLAND__) && !defined(__WXDEBUG__) - // There's a bug in Borland's compiler that breaks wxLocale with -O2, - // so make sure that flag is not used for this file: - #pragma option -O1 -#endif - #ifdef __EMX__ // The following define is needed by Innotek's libc to // make the definition of struct localeconv available. @@ -1719,7 +1713,7 @@ bool wxLocale::Init(int language, int flags) { retloc = wxSetlocaleTryUTF(LC_ALL, localeAlt); if ( !retloc ) - retloc = wxSetlocaleTryUTF(LC_ALL, locale.Left(2)); + retloc = wxSetlocaleTryUTF(LC_ALL, localeAlt.Left(2)); } } @@ -2505,7 +2499,9 @@ const wxLanguageInfo *wxLocale::GetLanguageInfo(int lang) { if ( ms_languagesDB->Item(i).Language == lang ) { - return &ms_languagesDB->Item(i); + // We need to create a temporary here in order to make this work with BCC in final build mode + wxLanguageInfo *ptr = &ms_languagesDB->Item(i); + return ptr; } }