diff options
author | kan <kan@FreeBSD.org> | 2003-11-07 02:44:01 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2003-11-07 02:44:01 +0000 |
commit | a342444c67382961a80b87c516fb6b2d85a15ffc (patch) | |
tree | 6e5365a8da80f9003283db9715c2f150cef8eb01 /contrib/libstdc++/config/os/generic/ctype_inline.h | |
parent | b09448931ae541a7a60fd1cf0ebac14b627fba69 (diff) | |
download | FreeBSD-src-a342444c67382961a80b87c516fb6b2d85a15ffc.zip FreeBSD-src-a342444c67382961a80b87c516fb6b2d85a15ffc.tar.gz |
Gcc 3.3.3 20031106 C++ support bits.
Diffstat (limited to 'contrib/libstdc++/config/os/generic/ctype_inline.h')
-rw-r--r-- | contrib/libstdc++/config/os/generic/ctype_inline.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/contrib/libstdc++/config/os/generic/ctype_inline.h b/contrib/libstdc++/config/os/generic/ctype_inline.h index be43c47..0da0c7c 100644 --- a/contrib/libstdc++/config/os/generic/ctype_inline.h +++ b/contrib/libstdc++/config/os/generic/ctype_inline.h @@ -50,13 +50,15 @@ else { bool __ret = true; - const int __bitmasksize = 11; - int __bitcur = 0; // Lowest bitmask in ctype_base == 0 - for (;__ret && __bitcur < __bitmasksize; ++__bitcur) + bool __any_match = false; + const size_t __bitmasksize = 10; + size_t __bitcur = 0; // Lowest bitmask in ctype_base == 0 + for (;__ret && __bitcur <= __bitmasksize; ++__bitcur) { mask __bit = static_cast<mask>(1 << __bitcur); if (__m & __bit) { + __any_match = true; bool __testis; switch (__bit) { @@ -100,7 +102,7 @@ __ret &= __testis; } } - return __ret; + return __ret & __any_match; } } @@ -114,13 +116,13 @@ else { // Highest bitmask in ctype_base == 10. - const int __bitmasksize = 11; + const size_t __bitmasksize = 10; for (;__low < __high; ++__vec, ++__low) { mask __m = 0; // Lowest bitmask in ctype_base == 0 - int __i = 0; - for (;__i < __bitmasksize; ++__i) + size_t __i = 0; + for (;__i <= __bitmasksize; ++__i) { mask __bit = static_cast<mask>(1 << __i); if (this->is(__bit, *__low)) |