mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-30 07:14:09 +08:00
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
This commit is contained in:
parent
3cd23a5e09
commit
a043b1f5c9
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user