locale_facets.tcc (money_get::do_get(..., string_type&): Move an if block...
2003-10-24 Paolo Carlini <pcarlini@suse.de> * include/bits/locale_facets.tcc (money_get::do_get(..., string_type&): Move an if block, thus minimizing the amount of code processed anyway when __tmp_units.size() == 0. From-SVN: r72887
This commit is contained in:
parent
904715853c
commit
cdd5cf7255
@ -1,3 +1,9 @@
|
||||
2003-10-24 Paolo Carlini <pcarlini@suse.de>
|
||||
|
||||
* include/bits/locale_facets.tcc (money_get::do_get(...,
|
||||
string_type&): Move an if block, thus minimizing the amount
|
||||
of code processed anyway when __tmp_units.size() == 0.
|
||||
|
||||
2003-10-24 Paolo Carlini <pcarlini@suse.de>
|
||||
|
||||
* include/bits/locale_facets.tcc
|
||||
|
@ -1270,20 +1270,6 @@ namespace std
|
||||
}
|
||||
}
|
||||
|
||||
// Need to get the rest of the sign characters, if they exist.
|
||||
const char_type __eof = static_cast<char_type>(char_traits<char_type>::eof());
|
||||
if (__sign.size() > 1)
|
||||
{
|
||||
const size_type __len = __sign.size();
|
||||
size_type __i = 1;
|
||||
for (; __c != __eof && __i < __len; ++__i)
|
||||
while (__beg != __end && __c != __sign[__i])
|
||||
__c = *(++__beg);
|
||||
|
||||
if (__i != __len)
|
||||
__testvalid = false;
|
||||
}
|
||||
|
||||
const char_type __zero = __ctype.widen('0');
|
||||
|
||||
// Strip leading zeros.
|
||||
@ -1322,6 +1308,20 @@ namespace std
|
||||
else
|
||||
__testvalid = false;
|
||||
|
||||
// Need to get the rest of the sign characters, if they exist.
|
||||
const char_type __eof = static_cast<char_type>(char_traits<char_type>::eof());
|
||||
if (__sign.size() > 1)
|
||||
{
|
||||
const size_type __len = __sign.size();
|
||||
size_type __i = 1;
|
||||
for (; __c != __eof && __i < __len; ++__i)
|
||||
while (__beg != __end && __c != __sign[__i])
|
||||
__c = *(++__beg);
|
||||
|
||||
if (__i != __len)
|
||||
__testvalid = false;
|
||||
}
|
||||
|
||||
// Iff no more characters are available.
|
||||
if (__c == __eof)
|
||||
__err |= ios_base::eofbit;
|
||||
|
Loading…
Reference in New Issue
Block a user