Return-Path: Delivered-To: apmail-stdcxx-commits-archive@www.apache.org Received: (qmail 39809 invoked from network); 15 Nov 2008 01:40:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Nov 2008 01:40:28 -0000 Received: (qmail 84634 invoked by uid 500); 15 Nov 2008 01:40:35 -0000 Delivered-To: apmail-stdcxx-commits-archive@stdcxx.apache.org Received: (qmail 84611 invoked by uid 500); 15 Nov 2008 01:40:35 -0000 Mailing-List: contact commits-help@stdcxx.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stdcxx.apache.org Delivered-To: mailing list commits@stdcxx.apache.org Received: (qmail 84602 invoked by uid 99); 15 Nov 2008 01:40:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Nov 2008 17:40:35 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 15 Nov 2008 01:39:12 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 603F7238898E; Fri, 14 Nov 2008 17:39:26 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r714213 - /stdcxx/branches/4.2.x/src/codecvt.cpp Date: Sat, 15 Nov 2008 01:39:26 -0000 To: commits@stdcxx.apache.org From: sebor@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20081115013926.603F7238898E@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 * 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 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);