[Patch] Avoid __uselocale in config/locale/gnu/numeric_members.cc
Paolo Carlini
pcarlini@suse.de
Sun Apr 11 21:19:00 GMT 2004
Martin Sebor wrote:
> 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";
Yeah, you are right (with some minor tweaks, since the two arrays are
actually slightly different).
I didn't want to go so far... but I *knew* that out loops actually
boiled down to just this!
Thanks, I will survey again the code and implement your more radical
suggestion.
Paolo.
More information about the Libstdc++
mailing list