You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stdcxx.apache.org by se...@apache.org on 2008/11/15 02:39:26 UTC
svn commit: r714213 - /stdcxx/branches/4.2.x/src/codecvt.cpp
Author: sebor
Date: Fri Nov 14 17:39:26 2008
New Revision: 714213
URL: http://svn.apache.org/viewvc?rev=714213&view=rev
Log:
2008-11-14 Martin Sebor <se...@roguewave.com>
* src/codecvt.cpp (codecvt::do_out, codecvt::do_in, codecvt::do_unshift,
codecvt::do_length): Used a more efficient expression as in r714208 in
wcodecvt.cpp. See gcc bug 38126:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38126 (and similarly for
Intel C++).
Modified:
stdcxx/branches/4.2.x/src/codecvt.cpp
Modified: stdcxx/branches/4.2.x/src/codecvt.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/src/codecvt.cpp?rev=714213&r1=714212&r2=714213&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/src/codecvt.cpp (original)
+++ stdcxx/branches/4.2.x/src/codecvt.cpp Fri Nov 14 17:39:26 2008
@@ -127,8 +127,8 @@
// verify that both ranges are valid
_RWSTD_ASSERT (from <= from_end);
_RWSTD_ASSERT (to <= to_end);
- _RWSTD_ASSERT ((from && from_end) || (!from && !from_end));
- _RWSTD_ASSERT ((to && to_end) || (!to && !to_end));
+ _RWSTD_ASSERT (!from == !from_end);
+ _RWSTD_ASSERT (!to == !to_end);
// next pointers must always be set before returning, even on error
from_next = from;
@@ -183,8 +183,8 @@
// verify that both ranges are valid
_RWSTD_ASSERT (from <= from_end);
_RWSTD_ASSERT (to <= to_end);
- _RWSTD_ASSERT ((from && from_end) || (!from && !from_end));
- _RWSTD_ASSERT ((to && to_end) || (!to && !to_end));
+ _RWSTD_ASSERT (!from == !from_end);
+ _RWSTD_ASSERT (!to == !to_end);
typedef codecvt<char, char, _RWSTD_MBSTATE_T> This;
@@ -204,7 +204,7 @@
{
// verify that the range is valid
_RWSTD_ASSERT (to <= to_end);
- _RWSTD_ASSERT ((to && to_end) || (!to && !to_end));
+ _RWSTD_ASSERT (!to == !to_end);
_RWSTD_UNUSED (to_end);
@@ -246,7 +246,7 @@
_RWSTD_ASSERT (from <= from_end);
// verify that the range is valid
- _RWSTD_ASSERT ((from && from_end) || (!from && !from_end));
+ _RWSTD_ASSERT (!from == !from_end);
const int mbstate_valid = _RW::__rw_mbsinit (&state);
_RWSTD_ASSERT (mbstate_valid);