aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Carlini <pcarlini@suse.de>2004-03-01 17:08:45 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2004-03-01 17:08:45 +0000
commitb19fb27d1e08dc9e666289b35984ffd2ba052e86 (patch)
tree05ef2fa411e18f390a5edd3a37b9ed43bc5b12cb
parent8f8cdf339c74e866fed91a4bb98ac5cfe3d8cf2b (diff)
downloadgcc-b19fb27d1e08dc9e666289b35984ffd2ba052e86.zip
gcc-b19fb27d1e08dc9e666289b35984ffd2ba052e86.tar.gz
gcc-b19fb27d1e08dc9e666289b35984ffd2ba052e86.tar.bz2
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 (money_get<>::_M_extract): Fix thinkos in the switch from string_type& to string& as last argument. From-SVN: r78707
-rw-r--r--libstdc++-v3/ChangeLog6
-rw-r--r--libstdc++-v3/include/bits/locale_facets.tcc6
2 files changed, 9 insertions, 3 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 251c5e0..1a7828c 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -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.
diff --git a/libstdc++-v3/include/bits/locale_facets.tcc b/libstdc++-v3/include/bits/locale_facets.tcc
index 9fb234b..399b5ad 100644
--- a/libstdc++-v3/include/bits/locale_facets.tcc
+++ b/libstdc++-v3/include/bits/locale_facets.tcc
@@ -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())