- gs_cLocale = new wxXLocale(static_cast<wxXLocaleCTag *>(NULL));
+ // NOTE: bcc551 has trouble doing static_cast with incomplete
+ // type definition. reinterpret_cast used as workaround
+ gs_cLocale = new wxXLocale( reinterpret_cast<wxXLocaleCTag *>(NULL) );
// TODO: wxLocale performs many more manipulations of the given locale
// string in the attempt to set a valid locale; reusing that code
// (changing it to take a generic wxTryLocale callback) would be nice
// TODO: wxLocale performs many more manipulations of the given locale
// string in the attempt to set a valid locale; reusing that code
// (changing it to take a generic wxTryLocale callback) would be nice
{
0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004,
0x0004, 0x0104, 0x0104, 0x0104, 0x0104, 0x0104, 0x0004, 0x0004,
{
0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004,
0x0004, 0x0104, 0x0104, 0x0104, 0x0104, 0x0104, 0x0004, 0x0004,
#define IMPLEMENT_STRTOX_L_START \
wxCHECK(loc.IsOk(), 0); \
\
#define IMPLEMENT_STRTOX_L_START \
wxCHECK(loc.IsOk(), 0); \
\
- /* (Try to) temporary set the locale to 'C' */ \
- const char *oldLocale = wxSetlocale(LC_NUMERIC, NULL); \
- const char *tmp = wxSetlocale(LC_NUMERIC, "C"); \
- if ( !tmp ) \
+ /* (Try to) temporary set the 'C' locale */ \
+ const char *oldLocale = wxSetlocale(LC_NUMERIC, "C"); \
+ if ( !oldLocale ) \
- /* restore the original locale */ \
- wxSetlocale(LC_NUMERIC, oldLocale); \
+ /* the current locale was not changed; no need to */ \
+ /* restore the previous one... */ \
}
long wxStrtol_l(const wchar_t* str, wchar_t **endptr, int base, const wxXLocale& loc)
}
long wxStrtol_l(const wchar_t* str, wchar_t **endptr, int base, const wxXLocale& loc)