+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
}
}
- // 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.
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;