This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [Patch] Avoid __uselocale in config/locale/gnu/numeric_members.cc
- From: Paolo Carlini <pcarlini at suse dot de>
- To: Martin Sebor <sebor at roguewave dot com>
- Cc: libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Sun, 11 Apr 2004 23:19:42 +0200
- Subject: Re: [Patch] Avoid __uselocale in config/locale/gnu/numeric_members.cc
- References: <4079691F.2030503@suse.de> <4079AEBC.1050202@roguewave.com>
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.