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:
Jerry Quinn 2003-12-30 03:09:17 +00:00 committed by Jerry Quinn
parent 3cd23a5e09
commit a043b1f5c9
2 changed files with 8 additions and 3 deletions

View File

@ -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

View File

@ -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;
}