You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-dev@logging.apache.org by af...@apache.org on 2007/05/12 16:54:53 UTC

svn commit: r537449 - /logging/log4cxx/trunk/src/unicodehelper.cpp

Author: afester
Date: Sat May 12 07:54:52 2007
New Revision: 537449

URL: http://svn.apache.org/viewvc?view=rev&rev=537449
Log:
LOGCXX-178: In case of __STDC_ISO_10646__, removed unused 
variable to avoid build failure with pedantic errors, and
fixed undefined variables

Modified:
    logging/log4cxx/trunk/src/unicodehelper.cpp

Modified: logging/log4cxx/trunk/src/unicodehelper.cpp
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/unicodehelper.cpp?view=diff&rev=537449&r1=537448&r2=537449
==============================================================================
--- logging/log4cxx/trunk/src/unicodehelper.cpp (original)
+++ logging/log4cxx/trunk/src/unicodehelper.cpp Sat May 12 07:54:52 2007
@@ -165,11 +165,12 @@
 #if LOG4CXX_LOGCHAR_IS_WCHAR
 unsigned int UnicodeHelper::decode(const LogString& in, LogString::const_iterator& iter) {
     const wchar_t* src = in.data() + (iter - in.begin());
-    const wchar_t* srcEnd = in.data() + in.length();
 #if defined(__STDC_ISO_10646__)
     unsigned int sv = *(src++);
 #elif defined(_WIN32)
+    const wchar_t* srcEnd = in.data() + in.length();
     unsigned int sv = *(src++);
+
     if (!(sv < 0xDC00 || sv >= 0xDC00)) {
     	if (src < srcEnd) {
         	unsigned short ls = *(src++);
@@ -215,7 +216,7 @@
   return 2;
 }
 #elif defined(__STDC_ISO_10646__)
-int UnicodeHelper::encode(unsigned int sv, logchar* out) {
+int UnicodeHelper::encode(unsigned int ch, logchar* dst) {
    *dst = ch;
    return 1;
 }