This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

[v3] Minor tweak to __numpunct_cache<>::_M_cache


Hi,

these zeroing (that I have added two days ago) can be safely removed.

Tested x86-linux (with 'if (_M_truename) abort();' and so on, to be
100% safe!)

Paolo.

///////////
2003-11-26  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.h
	(__numpunct_cache<>::_M_cache): Avoid zeroing _M_grouping,
	_M_truename and _M_falsename: the constructor always does
	it immediately before the _M_cache call.
diff -urN libstdc++-v3-1/include/bits/locale_facets.h libstdc++-v3/include/bits/locale_facets.h
--- libstdc++-v3-1/include/bits/locale_facets.h	2003-11-24 22:13:38.000000000 +0100
+++ libstdc++-v3/include/bits/locale_facets.h	2003-11-26 12:18:46.000000000 +0100
@@ -648,8 +648,6 @@
     __numpunct_cache<_CharT>::_M_cache(const locale& __loc)
     {
       _M_allocated = true;
-      _M_grouping = NULL;
-      _M_truename = _M_falsename = NULL;
 
       const numpunct<_CharT>& __np = use_facet<numpunct<_CharT> >(__loc);
 

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