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 locale_facets clean up


Hi,

tested x86-linux, committed to mainline.

Paolo.

/////////////////
2006-10-17  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (money_get<>::__do_get(iter_type,
	iter_type, bool, ios_base&, ios_base::iostate&, double&),
	money_get<>::do_get(iter_type, iter_type, bool, ios_base&,
	ios_base::iostate&, long double&), money_get<>::do_get(iter_type,
	iter_type, bool, ios_base&, ios_base::iostate&, string_type&)): Tidy.
Index: include/bits/locale_facets.tcc
===================================================================
--- include/bits/locale_facets.tcc	(revision 117826)
+++ include/bits/locale_facets.tcc	(working copy)
@@ -1537,10 +1537,8 @@
 	     ios_base::iostate& __err, double& __units) const
     {
       string __str;
-      if (__intl)
-	__beg = _M_extract<true>(__beg, __end, __io, __err, __str);
-      else
-	__beg = _M_extract<false>(__beg, __end, __io, __err, __str);
+      __beg = __intl ? _M_extract<true>(__beg, __end, __io, __err, __str)
+                     : _M_extract<false>(__beg, __end, __io, __err, __str);
       std::__convert_to_v(__str.c_str(), __units, __err, _S_get_c_locale());
       return __beg;
     }
@@ -1553,10 +1551,8 @@
 	   ios_base::iostate& __err, long double& __units) const
     {
       string __str;
-      if (__intl)
-	__beg = _M_extract<true>(__beg, __end, __io, __err, __str);
-      else
-	__beg = _M_extract<false>(__beg, __end, __io, __err, __str);
+      __beg = __intl ? _M_extract<true>(__beg, __end, __io, __err, __str)
+	             : _M_extract<false>(__beg, __end, __io, __err, __str);
       std::__convert_to_v(__str.c_str(), __units, __err, _S_get_c_locale());
       return __beg;
     }
@@ -1573,18 +1569,15 @@
       const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
 
       string __str;
-      const iter_type __ret = __intl ? _M_extract<true>(__beg, __end, __io,
-							__err, __str)
-	                             : _M_extract<false>(__beg, __end, __io,
-							 __err, __str);
+      __beg = __intl ? _M_extract<true>(__beg, __end, __io, __err, __str)
+	             : _M_extract<false>(__beg, __end, __io, __err, __str);
       const size_type __len = __str.size();
       if (__len)
 	{
 	  __digits.resize(__len);
 	  __ctype.widen(__str.data(), __str.data() + __len, &__digits[0]);
 	}
-
-      return __ret;
+      return __beg;
     }
 
   template<typename _CharT, typename _OutIter>

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