2003-12-02 Paolo Carlini <pcarlini@suse.de>

* config/locale/gnu/monetary_members.cc
	(money_base::_S_construct_pattern): For case 3: and 4:
	exchanging 'if (__precedes)' and 'if (__space)' allows
	to factor out a few more assignments.

From-SVN: r74168
This commit is contained in:
Paolo Carlini 2003-12-02 09:16:30 +00:00 committed by Paolo Carlini
parent 1d3f6c9fca
commit 142b798be5
2 changed files with 34 additions and 35 deletions

View File

@ -1,3 +1,10 @@
2003-12-02 Paolo Carlini <pcarlini@suse.de>
* config/locale/gnu/monetary_members.cc
(money_base::_S_construct_pattern): For case 3: and 4:
exchanging 'if (__precedes)' and 'if (__space)' allows
to factor out a few more assignments.
2003-12-01 Benjamin Kosnik <bkoz@redhat.com>
* include/bits/basic_ios.h (basic_ios::setstate): Revert.

View File

@ -132,78 +132,70 @@ namespace std
break;
case 3:
// 3 The sign immediately precedes the symbol.
if (__space)
if (__precedes)
{
// Have space.
if (__precedes)
__ret.field[0] = sign;
__ret.field[1] = symbol;
if (__space)
{
__ret.field[0] = sign;
__ret.field[1] = symbol;
__ret.field[2] = space;
__ret.field[3] = value;
}
else
{
__ret.field[0] = value;
__ret.field[2] = value;
__ret.field[3] = none;
}
}
else
{
__ret.field[0] = value;
if (__space)
{
__ret.field[1] = space;
__ret.field[2] = sign;
__ret.field[3] = symbol;
}
}
else
{
// Have none.
if (__precedes)
{
__ret.field[0] = sign;
__ret.field[1] = symbol;
__ret.field[2] = value;
}
else
{
__ret.field[0] = value;
__ret.field[1] = sign;
__ret.field[2] = symbol;
__ret.field[3] = none;
}
__ret.field[3] = none;
}
break;
case 4:
// 4 The sign immediately follows the symbol.
if (__space)
// 4 The sign immediately follows the symbol.
if (__precedes)
{
// Have space.
if (__precedes)
__ret.field[0] = symbol;
__ret.field[1] = sign;
if (__space)
{
__ret.field[0] = symbol;
__ret.field[1] = sign;
__ret.field[2] = space;
__ret.field[3] = value;
}
else
{
__ret.field[0] = value;
__ret.field[1] = space;
__ret.field[2] = symbol;
__ret.field[3] = sign;
__ret.field[2] = value;
__ret.field[3] = none;
}
}
else
{
// Have none.
if (__precedes)
__ret.field[0] = value;
if (__space)
{
__ret.field[0] = symbol;
__ret.field[1] = sign;
__ret.field[2] = value;
__ret.field[1] = space;
__ret.field[2] = symbol;
__ret.field[3] = sign;
}
else
{
__ret.field[0] = value;
__ret.field[1] = symbol;
__ret.field[2] = sign;
__ret.field[3] = none;
}
__ret.field[3] = none;
}
break;
default: