diff options
author | Lars Næsbye Christensen <lars@naesbye.dk> | 2024-01-11 22:54:30 +0100 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-01-16 15:54:26 +0200 |
commit | 0249eefe53f2267a179a1271ae21b9c9af878ca9 (patch) | |
tree | 58c42bf56ef3ecd9bc72b7b7c4332b849263b60f | |
parent | 4a03aa089009af9130076b438192e338bc202584 (diff) |
Locale problems prior to OS X 10.4 no longer apply
localeconv() returns the right values in later versions, and we only support 10.13+
-rw-r--r-- | indra/llui/llresmgr.cpp | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/indra/llui/llresmgr.cpp b/indra/llui/llresmgr.cpp index d65c220974..23e0842f37 100644 --- a/indra/llui/llresmgr.cpp +++ b/indra/llui/llresmgr.cpp @@ -51,14 +51,6 @@ char LLResMgr::getDecimalPoint() const { char decimal = localeconv()->decimal_point[0]; -#if LL_DARWIN - // On the Mac, locale support is broken before 10.4, which causes things to go all pear-shaped. - if(decimal == 0) - { - decimal = '.'; - } -#endif - return decimal; } @@ -66,14 +58,6 @@ char LLResMgr::getThousandsSeparator() const { char separator = localeconv()->thousands_sep[0]; -#if LL_DARWIN - // On the Mac, locale support is broken before 10.4, which causes things to go all pear-shaped. - if(separator == 0) - { - separator = ','; - } -#endif - return separator; } @@ -81,14 +65,6 @@ char LLResMgr::getMonetaryDecimalPoint() const { char decimal = localeconv()->mon_decimal_point[0]; -#if LL_DARWIN - // On the Mac, locale support is broken before 10.4, which causes things to go all pear-shaped. - if(decimal == 0) - { - decimal = '.'; - } -#endif - return decimal; } @@ -96,14 +72,6 @@ char LLResMgr::getMonetaryThousandsSeparator() const { char separator = localeconv()->mon_thousands_sep[0]; -#if LL_DARWIN - // On the Mac, locale support is broken before 10.4, which causes things to go all pear-shaped. - if(separator == 0) - { - separator = ','; - } -#endif - return separator; } @@ -115,29 +83,6 @@ std::string LLResMgr::getMonetaryString( S32 input ) const LLLocale locale(LLLocale::USER_LOCALE); struct lconv *conv = localeconv(); - -#if LL_DARWIN - // On the Mac, locale support is broken before 10.4, which causes things to go all pear-shaped. - // Fake up a conv structure with some reasonable values for the fields this function uses. - struct lconv fakeconv; - char fake_neg[2] = "-"; - char fake_mon_group[4] = "\x03\x03\x00"; // commas every 3 digits - if(conv->negative_sign[0] == 0) // Real locales all seem to have something here... - { - fakeconv = *conv; // start with what's there. - switch(mLocale) - { - default: // Unknown -- use the US defaults. - case LLLOCALE_USA: - case LLLOCALE_UK: // UK ends up being the same as US for the items used here. - fakeconv.negative_sign = fake_neg; - fakeconv.mon_grouping = fake_mon_group; - fakeconv.n_sign_posn = 1; // negative sign before the string - break; - } - conv = &fakeconv; - } -#endif char* negative_sign = conv->negative_sign; char separator = getMonetaryThousandsSeparator(); |