[Patch] Avoid __uselocale in config/locale/gnu/numeric_members.cc

Martin Sebor sebor@roguewave.com
Sun Apr 11 20:50:00 GMT 2004


Paolo Carlini wrote:
...
>  	  // Use ctype::widen code without the facet...
>  	  unsigned char uc;
>  	  for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
> @@ -122,9 +119,6 @@
>  	      uc = static_cast<unsigned char>(__num_base::_S_atoms_in[__i]);
>  	      _M_data->_M_atoms_in[__i] = btowc(uc);

Just one comment: if you don't set the locale (but even if you did)
btowc(uc) will most likely return (wchar_t)uc for all values of uc
in this loop. (I have yet to see a real locale where this isn't
true). So you might as well just assign

     _M_data->_M_atoms_in = L"-+xX0123456789abcdefABCDEF";

Martin



More information about the Libstdc++ mailing list