diff options
author | Jerry Quinn <jlquinn@optonline.net> | 2003-12-30 03:09:17 +0000 |
---|---|---|
committer | Jerry Quinn <jlquinn@gcc.gnu.org> | 2003-12-30 03:09:17 +0000 |
commit | a043b1f5c90b437896c826c80244aa06e7fd2926 (patch) | |
tree | 5e2893db4e29bbaf0d525ea21872a71589bec9cf | |
parent | 3cd23a5e0956e711a54553bbce20820739f8ad4f (diff) | |
download | gcc-a043b1f5c90b437896c826c80244aa06e7fd2926.zip gcc-a043b1f5c90b437896c826c80244aa06e7fd2926.tar.gz gcc-a043b1f5c90b437896c826c80244aa06e7fd2926.tar.bz2 |
locale_facets.h (ctype.narrow,widen): Add cast.
2003-12-29 Jerry Quinn <jlquinn@optonline.net>
* include/bits/locale_facets.h (ctype.narrow,widen): Add cast.
From-SVN: r75222
-rw-r--r-- | libstdc++-v3/ChangeLog | 4 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/locale_facets.h | 7 |
2 files changed, 8 insertions, 3 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 448c966..5c8ca19 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,7 @@ +2003-12-29 Jerry Quinn <jlquinn@optonline.net> + + * include/bits/locale_facets.h (ctype.narrow,widen): Add cast. + 2003-12-29 Paolo Carlini <pcarlini@suse.de> * acinclude.m4 (GLIBCXX_CHECK_LFS): Add -fno-exceptions diff --git a/libstdc++-v3/include/bits/locale_facets.h b/libstdc++-v3/include/bits/locale_facets.h index eecb15c..2d3f776 100644 --- a/libstdc++-v3/include/bits/locale_facets.h +++ b/libstdc++-v3/include/bits/locale_facets.h @@ -878,7 +878,7 @@ namespace std char_type widen(char __c) const { - if (_M_widen_ok) return _M_widen[__c]; + if (_M_widen_ok) return _M_widen[static_cast<unsigned char>(__c)]; this->_M_widen_init(); return this->do_widen(__c); } @@ -934,9 +934,10 @@ namespace std char narrow(char_type __c, char __dfault) const { - if (_M_narrow[__c]) return _M_narrow[__c]; + if (_M_narrow[static_cast<unsigned char>(__c)]) + return _M_narrow[static_cast<unsigned char>(__c)]; const char __t = do_narrow(__c, __dfault); - if (__t != __dfault) _M_narrow[__c] = __t; + if (__t != __dfault) _M_narrow[static_cast<unsigned char>(__c)] = __t; return __t; } |