ctype_inline.h (is): Don't offset _M_table.
authorDanny Smith <dannysmith@users.sourceforge.net>
Fri, 2 Aug 2002 16:10:12 +0000 (16:10 +0000)
committerBenjamin Kosnik <bkoz@gcc.gnu.org>
Fri, 2 Aug 2002 16:10:12 +0000 (16:10 +0000)
2002-08-02 Danny Smith  <dannysmith@users.sourceforge.net>

* 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
libstdc++-v3/config/os/newlib/ctype_inline.h

index 1fd251d..afd67a1 100644 (file)
@@ -1,3 +1,9 @@
+2002-08-02 Danny Smith  <dannysmith@users.sourceforge.net>
+
+       * 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  <bkoz@redhat.com>
 
        Revert PR libstdc++/6594
index cd3e9ba..8381ace 100644 (file)
   bool
   ctype<char>::
   is(mask __m, char __c) const
-  { return (_M_table + 1)[static_cast<unsigned char>(__c)] & __m; }
+  { return _M_table[static_cast<unsigned char>(__c)] & __m; }
 
   const char*
   ctype<char>::
   is(const char* __low, const char* __high, mask* __vec) const
   {
     while (__low < __high)
-      *__vec++ = (_M_table + 1)[static_cast<unsigned char>(*__low++)];
+      *__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
     return __high;
   }
 
@@ -52,8 +52,7 @@
   ctype<char>::
   scan_is(mask __m, const char* __low, const char* __high) const 
   {
-    while (__low < __high 
-          && !((_M_table + 1)[static_cast<unsigned char>(*__low)] & __m))
+    while (__low < __high && !this->is(__m, *__low))
       ++__low;
     return __low;
   }
@@ -62,8 +61,7 @@
   ctype<char>::
   scan_not(mask __m, const char* __low, const char* __high) const
   {
-    while (__low < __high 
-          && ((_M_table + 1)[static_cast<unsigned char>(*__low)] & __m) != 0)
+    while (__low < __high && this->is(__m, *__low) != 0)
       ++__low;
     return __low;
   }