From b5028f5e8b688acb83c4052a3bf4147c174473c0 Mon Sep 17 00:00:00 2001 From: Danny Smith Date: Fri, 2 Aug 2002 16:10:12 +0000 Subject: [PATCH] ctype_inline.h (is): Don't offset _M_table. 2002-08-02 Danny Smith * config/os/newlib/ctype_inline.h (is): Don't offset _M_table. (scan_is): Use this->is. (scan_not): Likewise. From-SVN: r55989 --- libstdc++-v3/ChangeLog | 6 ++++++ libstdc++-v3/config/os/newlib/ctype_inline.h | 10 ++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 1fd251d..afd67a1 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2002-08-02 Danny Smith + + * config/os/newlib/ctype_inline.h (is): Don't offset _M_table. + (scan_is): Use this->is. + (scan_not): Likewise. + 2002-08-02 Benjamin Kosnik Revert PR libstdc++/6594 diff --git a/libstdc++-v3/config/os/newlib/ctype_inline.h b/libstdc++-v3/config/os/newlib/ctype_inline.h index cd3e9ba..8381ace 100644 --- a/libstdc++-v3/config/os/newlib/ctype_inline.h +++ b/libstdc++-v3/config/os/newlib/ctype_inline.h @@ -37,14 +37,14 @@ bool ctype:: is(mask __m, char __c) const - { return (_M_table + 1)[static_cast(__c)] & __m; } + { return _M_table[static_cast(__c)] & __m; } const char* ctype:: is(const char* __low, const char* __high, mask* __vec) const { while (__low < __high) - *__vec++ = (_M_table + 1)[static_cast(*__low++)]; + *__vec++ = _M_table[static_cast(*__low++)]; return __high; } @@ -52,8 +52,7 @@ ctype:: scan_is(mask __m, const char* __low, const char* __high) const { - while (__low < __high - && !((_M_table + 1)[static_cast(*__low)] & __m)) + while (__low < __high && !this->is(__m, *__low)) ++__low; return __low; } @@ -62,8 +61,7 @@ ctype:: scan_not(mask __m, const char* __low, const char* __high) const { - while (__low < __high - && ((_M_table + 1)[static_cast(*__low)] & __m) != 0) + while (__low < __high && this->is(__m, *__low) != 0) ++__low; return __low; } -- 2.7.4