[Patch] Clean up and reformat to config/numeric and time
Paolo Carlini
pcarlini@suse.de
Thu Jun 17 18:42:00 GMT 2004
Hi,
the second half of the patch is straightforward: it uses an union
(consistently with numeric) instead of reinterpret_cast in order to
avoid *a lot* of overlong lines.
The first hunk is slighlty less trivial, I would appreciate a look
over it. We had:
union __s_and_w { const char *__s; unsigned int __w; } __u;
__u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
_M_data->_M_decimal_point = static_cast<wchar_t>(__u.__w);
I changed it to:
union { char *__s; wchar_t __w; } __u;
__u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
_M_data->_M_decimal_point = __u.__w;
that is, basically, the union has directly wchar_t instead of the
(weird) intermediate unsigned int + final static_cast. The net
effect seems the same to me and the code slightly cleaner.
Tested x86-linux, would commit tomorrow.
Paolo.
/////////////
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CL_config
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20040617/42c4875b/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch_config
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20040617/42c4875b/attachment-0001.ksh>
More information about the Libstdc++
mailing list