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


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


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