2004-03-01 Paolo Carlini <pcarlini@suse.de>
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 1 Mar 2004 17:08:45 +0000 (17:08 +0000)
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 1 Mar 2004 17:08:45 +0000 (17:08 +0000)
* include/bits/locale_facets.tcc (money_get<>::_M_extract):
Fix thinkos in the switch from string_type& to string& as last
argument.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@78707 138bc75d-0d04-0410-961f-82ee72b054a4

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/locale_facets.tcc

index 251c5e0..1a7828c 100644 (file)
@@ -1,5 +1,11 @@
 2004-03-01  Paolo Carlini  <pcarlini@suse.de>
 
+       * include/bits/locale_facets.tcc (money_get<>::_M_extract):
+       Fix thinkos in the switch from string_type& to string& as last
+       argument.
+
+2004-03-01  Paolo Carlini  <pcarlini@suse.de>
+
        * include/bits/locale_facets.tcc (num_get<>::_M_extract_float):
        Also when parsing exponent sign, first look for thousands_sep
        and decimal_point; tweak a bit.
index 9fb234b..399b5ad 100644 (file)
@@ -1338,15 +1338,15 @@ namespace std
            // Strip leading zeros.
            if (__res.size() > 1)
              {
-               size_type __first = __res.find_first_not_of(__lit[_S_zero]);
+               const size_type __first = __res.find_first_not_of('0');
                const bool __only_zeros = __first == string_type::npos;
                if (__first)
                  __res.erase(0, __only_zeros ? __res.size() - 1 : __first);
              }
 
            // 22.2.6.1.2, p4
-           if (__negative && __res[0] != __lit[_S_zero])
-             __res.insert(__res.begin(), __lit[_S_minus]);
+           if (__negative && __res[0] != '0')
+             __res.insert(__res.begin(), '-');
            
            // Test for grouping fidelity.
            if (__grouping_tmp.size())