]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
locale_facets.tcc (money_get<>::_M_extract): Fix thinkos in the switch from string_ty...
authorPaolo Carlini <pcarlini@suse.de>
Mon, 1 Mar 2004 17:08:45 +0000 (17:08 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Mon, 1 Mar 2004 17:08:45 +0000 (17:08 +0000)
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.

From-SVN: r78707

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

index 251c5e00b623afb6a92c82e097f27516b74c83a8..1a7828c3e965c40d076ed6b1874f73ff1e19609c 100644 (file)
@@ -1,3 +1,9 @@
+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):
index 9fb234b03b21841f587f5d7de51aa7f21ce58691..399b5adc2852de69b9006c31c433c81fa4aa53c5 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())