]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/config/locale/gnu/monetary_members.cc
localefwd.h (class locale): Add static member _S_num_extra_categories...
[thirdparty/gcc.git] / libstdc++-v3 / config / locale / gnu / monetary_members.cc
index 68b154bdc7ceb80f9fe656533e153217e82accbf..0386ab6dc5469ce43e1db4dbf8817bf66a99d101 100644 (file)
@@ -220,7 +220,7 @@ namespace std
     moneypunct<char, true>::_M_initialize_moneypunct(__c_locale __cloc, 
                                                     const char*)
     {
-      if (__cloc == _S_c_locale)
+      if (!__cloc)
        {
          // "C" locale
          _M_decimal_point = '.';
@@ -265,7 +265,7 @@ namespace std
     moneypunct<char, false>::_M_initialize_moneypunct(__c_locale __cloc, 
                                                      const char*)
     {
-      if (__cloc == _S_c_locale)
+      if (!__cloc)
        {
          // "C" locale
          _M_decimal_point = '.';
@@ -319,7 +319,7 @@ namespace std
     moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale __cloc, 
                                                        const char* __name)
     {
-      if (__cloc == _S_c_locale)
+      if (!__cloc)
        {
          // "C" locale
          _M_decimal_point = L'.';
@@ -348,14 +348,12 @@ namespace std
          _M_thousands_sep = static_cast<wchar_t>(((union { const char *__s; unsigned int __w; }){ __s: __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc)}).__w);
          _M_grouping = __nl_langinfo_l(GROUPING, __cloc);
 
-         mbstate_t __state;
-         size_t __len;
          const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
          const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
          const char* __ccurr = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
 
-         // NB: Should swich to __cloc's ctype info first.
-         __len = strlen(__cpossign);
+         mbstate_t __state;
+         size_t __len = strlen(__cpossign);
          if (__len)
            {
              ++__len;
@@ -418,7 +416,7 @@ namespace std
     moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale __cloc, 
                                                         const char* __name)
     {
-      if (__cloc == _S_c_locale)
+      if (!__cloc)
        {
          // "C" locale
          _M_decimal_point = L'.';
@@ -446,13 +444,12 @@ namespace std
          _M_thousands_sep = static_cast<wchar_t>(((union { const char *__s; unsigned int __w; }){ __s: __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc)}).__w);
          _M_grouping = __nl_langinfo_l(GROUPING, __cloc);
 
-         mbstate_t __state;
-         size_t __len;
          const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
          const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
          const char* __ccurr = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
 
-         // NB: Should swich to __cloc's ctype info first.
+         mbstate_t __state;
+         size_t __len;
          __len = strlen(__cpossign);
          if (__len)
            {