Commit eaed902b by Paolo Carlini Committed by Paolo Carlini

locale.cc (locale::locale(const char*)): Tweak a couple of comparisons to use…

locale.cc (locale::locale(const char*)): Tweak a couple of comparisons to use basic_string operators.

2003-10-16  Paolo Carlini  <pcarlini@suse.de>

	* src/locale.cc (locale::locale(const char*)): Tweak
	a couple of comparisons to use basic_string operators.

From-SVN: r72554
parent f991b1d8
2003-10-16 Paolo Carlini <pcarlini@suse.de> 2003-10-16 Paolo Carlini <pcarlini@suse.de>
* src/locale.cc (locale::locale(const char*)): Tweak
a couple of comparisons to use basic_string operators.
2003-10-16 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/12540 PR libstdc++/12540
* config/locale/gnu/monetary_members.cc * config/locale/gnu/monetary_members.cc
(moneypunct<wchar_t, true/false>::_M_initialize_moneypunct): (moneypunct<wchar_t, true/false>::_M_initialize_moneypunct):
......
...@@ -221,21 +221,21 @@ namespace std ...@@ -221,21 +221,21 @@ namespace std
// Scan the categories looking for the first one // Scan the categories looking for the first one
// different from LANG. // different from LANG.
size_t __i = 0; size_t __i = 0;
if (std::strcmp(__res.c_str(), "C") == 0) if (__res == "C")
for (; __i < _S_categories_size; ++__i) for (; __i < _S_categories_size; ++__i)
{ {
__env = std::getenv(_S_categories[__i]); __env = std::getenv(_S_categories[__i]);
if (__env && std::strcmp(__env, "") != 0 if (__env && std::strcmp(__env, "") != 0
&& std::strcmp(__env, "C") != 0 && std::strcmp(__env, "C") != 0
&& std::strcmp(__env, "POSIX") != 0) && std::strcmp(__env, "POSIX") != 0)
break; break;
} }
else else
for (; __i < _S_categories_size; ++__i) for (; __i < _S_categories_size; ++__i)
{ {
__env = std::getenv(_S_categories[__i]); __env = std::getenv(_S_categories[__i]);
if (__env && std::strcmp(__env, "") != 0 if (__env && std::strcmp(__env, "") != 0
&& std::strcmp(__env, __res.c_str()) != 0) && __res != __env)
break; break;
} }
......
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