From b3b363332380c4306374247285e21a7ac771731b Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Tue, 17 Oct 2006 16:43:47 +0000 Subject: [PATCH] locale_facets.tcc (money_get<>::__do_get(iter_type, iter_type, bool, ios_base&, ios_base::iostate&, double&), [...]): Tidy. 2006-10-17 Paolo Carlini * include/bits/locale_facets.tcc (money_get<>::__do_get(iter_type, iter_type, bool, ios_base&, ios_base::iostate&, double&), money_get<>::do_get(iter_type, iter_type, bool, ios_base&, ios_base::iostate&, long double&), money_get<>::do_get(iter_type, iter_type, bool, ios_base&, ios_base::iostate&, string_type&)): Tidy. From-SVN: r117828 --- libstdc++-v3/ChangeLog | 8 ++++++++ libstdc++-v3/include/bits/locale_facets.tcc | 21 +++++++-------------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index ac94e35f9d8..5dacf66aafb 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,11 @@ +2006-10-17 Paolo Carlini + + * include/bits/locale_facets.tcc (money_get<>::__do_get(iter_type, + iter_type, bool, ios_base&, ios_base::iostate&, double&), + money_get<>::do_get(iter_type, iter_type, bool, ios_base&, + ios_base::iostate&, long double&), money_get<>::do_get(iter_type, + iter_type, bool, ios_base&, ios_base::iostate&, string_type&)): Tidy. + 2006-10-17 Paolo Carlini PR libstdc++/26020 diff --git a/libstdc++-v3/include/bits/locale_facets.tcc b/libstdc++-v3/include/bits/locale_facets.tcc index 49c64a11add..d3c47ff9b7f 100644 --- a/libstdc++-v3/include/bits/locale_facets.tcc +++ b/libstdc++-v3/include/bits/locale_facets.tcc @@ -1537,10 +1537,8 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE ios_base::iostate& __err, double& __units) const { string __str; - if (__intl) - __beg = _M_extract(__beg, __end, __io, __err, __str); - else - __beg = _M_extract(__beg, __end, __io, __err, __str); + __beg = __intl ? _M_extract(__beg, __end, __io, __err, __str) + : _M_extract(__beg, __end, __io, __err, __str); std::__convert_to_v(__str.c_str(), __units, __err, _S_get_c_locale()); return __beg; } @@ -1553,10 +1551,8 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE ios_base::iostate& __err, long double& __units) const { string __str; - if (__intl) - __beg = _M_extract(__beg, __end, __io, __err, __str); - else - __beg = _M_extract(__beg, __end, __io, __err, __str); + __beg = __intl ? _M_extract(__beg, __end, __io, __err, __str) + : _M_extract(__beg, __end, __io, __err, __str); std::__convert_to_v(__str.c_str(), __units, __err, _S_get_c_locale()); return __beg; } @@ -1573,18 +1569,15 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE const ctype<_CharT>& __ctype = use_facet >(__loc); string __str; - const iter_type __ret = __intl ? _M_extract(__beg, __end, __io, - __err, __str) - : _M_extract(__beg, __end, __io, - __err, __str); + __beg = __intl ? _M_extract(__beg, __end, __io, __err, __str) + : _M_extract(__beg, __end, __io, __err, __str); const size_type __len = __str.size(); if (__len) { __digits.resize(__len); __ctype.widen(__str.data(), __str.data() + __len, &__digits[0]); } - - return __ret; + return __beg; } template -- 2.30.2