Commit d7ed521b by Paolo Carlini Committed by Paolo Carlini

locale.cc (locale::operator==): When _M_impl == __rhs._M_impl avoid constructing…

locale.cc (locale::operator==): When _M_impl == __rhs._M_impl avoid constructing unnecessarily this->name().

2004-04-15  Paolo Carlini  <pcarlini@suse.de>

	* src/locale.cc (locale::operator==): When _M_impl == __rhs._M_impl
	avoid constructing unnecessarily this->name().

From-SVN: r80714
parent ea7b98d0
2004-04-15 Paolo Carlini <pcarlini@suse.de>
* src/locale.cc (locale::operator==): When _M_impl == __rhs._M_impl
avoid constructing unnecessarily this->name().
2004-04-14 Zack Weinberg <zack@codesourcery.com>
* testsuite/Makefile.am: Add definition of AM_CXXFLAGS.
......
......@@ -70,9 +70,16 @@ namespace std
bool
locale::operator==(const locale& __rhs) const throw()
{
string __name = this->name();
return (_M_impl == __rhs._M_impl
|| (__name != "*" && __name == __rhs.name()));
bool __ret = false;
if (_M_impl == __rhs._M_impl)
__ret = true;
else
{
const string __name = this->name();
if (__name != "*" && __name == __rhs.name())
__ret = true;
}
return __ret;
}
const locale&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment