This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]