diff options
author | bkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-07-04 22:33:04 +0000 |
---|---|---|
committer | bkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-07-04 22:33:04 +0000 |
commit | f915e029c00d6b400d5547d3bce4b008f844e818 (patch) | |
tree | 158b1808ae943b89d8aaa806ea864f59e5f88303 /libstdc++-v3/include | |
parent | 1e98c8f357e2ce08a6f64b010c4d8314fe8b0567 (diff) | |
download | gcc-f915e029c00d6b400d5547d3bce4b008f844e818.tar.gz |
2003-07-04 Benjamin Kosnik <bkoz@redhat.com>
* acinclude.m4 (GLIBCPP_ENABLE_PCH): Fix missed variable.
* aclocal.m4: Regenerate.
* configure: Regenerate.
2003-07-04 Jerry Quinn <jlquinn@optonline.net>
* include/bits/locale_facets.tcc (__int_to_char): Move common case
to the top.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68942 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include')
-rw-r--r-- | libstdc++-v3/include/bits/locale_facets.tcc | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/libstdc++-v3/include/bits/locale_facets.tcc b/libstdc++-v3/include/bits/locale_facets.tcc index aca0e056d67..9026a3e4960 100644 --- a/libstdc++-v3/include/bits/locale_facets.tcc +++ b/libstdc++-v3/include/bits/locale_facets.tcc @@ -692,7 +692,22 @@ namespace std _CharT* __buf = __out + __size - 1; _CharT* __bufend = __out + __size; - if (__builtin_expect(__basefield == ios_base::oct, false)) + if (__builtin_expect(__basefield != ios_base::oct && + __basefield != ios_base::hex, true)) + { + // Decimal. + do + { + *__buf-- = __lit[(__v % 10) + __num_base::_S_odigits]; + __v /= 10; + } + while (__v != 0); + if (__neg) + *__buf-- = __lit[__num_base::_S_ominus]; + else if (__flags & ios_base::showpos) + *__buf-- = __lit[__num_base::_S_oplus]; + } + else if (__basefield == ios_base::oct) { // Octal. do @@ -704,7 +719,7 @@ namespace std if (__showbase) *__buf-- = __lit[__num_base::_S_odigits]; } - else if (__builtin_expect(__basefield == ios_base::hex, false)) + else { // Hex. const bool __uppercase = __flags & ios_base::uppercase; @@ -724,20 +739,6 @@ namespace std *__buf-- = __lit[__num_base::_S_odigits]; } } - else - { - // Decimal. - do - { - *__buf-- = __lit[(__v % 10) + __num_base::_S_odigits]; - __v /= 10; - } - while (__v != 0); - if (__neg) - *__buf-- = __lit[__num_base::_S_ominus]; - else if (__flags & ios_base::showpos) - *__buf-- = __lit[__num_base::_S_oplus]; - } int __ret = __bufend - __buf - 1; return __ret; } |