aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/config/os/solaris/solaris2.7/bits/ctype_inline.h
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/config/os/solaris/solaris2.7/bits/ctype_inline.h')
-rw-r--r--libstdc++-v3/config/os/solaris/solaris2.7/bits/ctype_inline.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/libstdc++-v3/config/os/solaris/solaris2.7/bits/ctype_inline.h b/libstdc++-v3/config/os/solaris/solaris2.7/bits/ctype_inline.h
index 8ec057dfb47..af409c87629 100644
--- a/libstdc++-v3/config/os/solaris/solaris2.7/bits/ctype_inline.h
+++ b/libstdc++-v3/config/os/solaris/solaris2.7/bits/ctype_inline.h
@@ -1,6 +1,6 @@
// Locale support -*- C++ -*-
-// Copyright (C) 2000 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2002 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -37,14 +37,14 @@
bool
ctype<char>::
is(mask __m, char __c) const
- { return _M_table[__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[*__low++];
+ *__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
return __high;
}
@@ -52,7 +52,8 @@
ctype<char>::
scan_is(mask __m, const char* __low, const char* __high) const
{
- while (__low < __high && !(_M_table[*__low] & __m))
+ while (__low < __high
+ && !(_M_table[static_cast<unsigned char>(*__low)] & __m))
++__low;
return __low;
}
@@ -62,7 +63,7 @@
scan_not(mask __m, const char* __low, const char* __high) const
{
while (__low < __high
- && (_M_table[*__low] & __m) != 0)
+ && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0)
++__low;
return __low;
}