Return-Path: Delivered-To: apmail-stdcxx-commits-archive@www.apache.org Received: (qmail 9073 invoked from network); 18 Apr 2008 19:43:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Apr 2008 19:43:12 -0000 Received: (qmail 73048 invoked by uid 500); 18 Apr 2008 19:43:13 -0000 Delivered-To: apmail-stdcxx-commits-archive@stdcxx.apache.org Received: (qmail 73039 invoked by uid 500); 18 Apr 2008 19:43:13 -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 73030 invoked by uid 99); 18 Apr 2008 19:43:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Apr 2008 12:43:13 -0700 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.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Apr 2008 19:42:28 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 05BD81A9832; Fri, 18 Apr 2008 12:42:49 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r649665 - /stdcxx/trunk/src/wcodecvt.cpp Date: Fri, 18 Apr 2008 19:42:48 -0000 To: commits@stdcxx.apache.org From: sebor@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080418194249.05BD81A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: sebor Date: Fri Apr 18 12:42:45 2008 New Revision: 649665 URL: http://svn.apache.org/viewvc?rev=649665&view=rev Log: 2008-04-18 Martin Sebor * src/wcodecvt.cpp (__rw_libstd_do_out): Replaced the local equivalent of _RWSTD_UWCHAR_INT_T newly introduced in r649646 with the said type. Modified: stdcxx/trunk/src/wcodecvt.cpp Modified: stdcxx/trunk/src/wcodecvt.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/src/wcodecvt.cpp?rev=649665&r1=649664&r2=649665&view=diff ============================================================================== --- stdcxx/trunk/src/wcodecvt.cpp (original) +++ stdcxx/trunk/src/wcodecvt.cpp Fri Apr 18 12:42:45 2008 @@ -765,20 +765,12 @@ // in strict mode check wide character for validity // (i.e., diagnose surrogate pairs as illegal) -# if _RWSTD_WCHAR_SIZE == _RWSTD_CHAR_SIZE - typedef unsigned char WIntT; -# elif _RWSTD_WCHAR_SIZE == _RWSTD_SHRT_SIZE - typedef unsigned short WIntT; -# elif _RWSTD_WCHAR_SIZE ==_RWSTD_INT_SIZE - typedef unsigned int WIntT; -# elif _RWSTD_WCHAR_SIZE ==_RWSTD_LLONG_SIZE - typedef unsigned _RWSTD_LONG_LONG WIntT; -# else - typedef unsigned long WIntT; -# endif + typedef _RWSTD_UWCHAR_INT_T WIntT; - // convert wchar_t to an unsigned integer safe for comaprison - const unsigned long wi = _RWSTD_STATIC_CAST (WIntT, *from_next); + // convert wchar_t to the unsigned form of its underlying + // integer type that's safe in arithmetic comaprisons and + // doesn't generate signed/unsigned compiler warnings + const WIntT wi = _RWSTD_STATIC_CAST (WIntT, *from_next); if ( WIntT (0xd800U) <= wi && wi <= WIntT (0xdfffU) || WIntT (0xfffeU) <= wi && wi <= WIntT (0xffffU)) {