From: Paul Cornett Date: Sat, 28 Jul 2007 17:07:52 +0000 (+0000) Subject: Fix wxCRT_GetenvW WXDLLEXPORT. Use more efficient preincrement operator on iterators. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/b2dd2f28f3baf9c6db0dfb90e69c3a8f489737bc Fix wxCRT_GetenvW WXDLLEXPORT. Use more efficient preincrement operator on iterators. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47789 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/wxcrt.cpp b/src/common/wxcrt.cpp index 341058372d..a1d235bcfc 100644 --- a/src/common/wxcrt.cpp +++ b/src/common/wxcrt.cpp @@ -367,7 +367,7 @@ int wxCRT_ScanfW(const wchar_t *format, ...) #else int ret = vwscanf(format, argptr); #endif - + va_end(argptr); return ret; @@ -841,7 +841,7 @@ extern "C" WXDLLEXPORT size_t wxCRT_StrlenW(const wchar_t *s) // ---------------------------------------------------------------------------- #ifndef wxCRT_GetenvW -wchar_t* WXDLLEXPORT wxCRT_GetenvW(const wchar_t *name) +WXDLLEXPORT wchar_t* wxCRT_GetenvW(const wchar_t *name) { // NB: buffer returned by getenv() is allowed to be overwritten next // time getenv() is called, so it is OK to use static string @@ -891,7 +891,7 @@ wxCRT_StrtoullBase(const T* nptr, T** endptr, int base, T* sign) wxString::const_iterator end = wxstr.end(); // Skip spaces - while ( i != end && wxIsspace(*i) ) i++; + while ( i != end && wxIsspace(*i) ) ++i; // Starts with sign? *sign = wxT(' '); @@ -901,20 +901,20 @@ wxCRT_StrtoullBase(const T* nptr, T** endptr, int base, T* sign) if ( c == wxT('+') || c == wxT('-') ) { *sign = c; - i++; + ++i; } } // Starts with 0x? if ( i != end && *i == wxT('0') ) { - i++; + ++i; if ( i != end ) { if ( *i == wxT('x') && (base == 16 || base == 0) ) { base = 16; - i++; + ++i; } else { @@ -925,13 +925,13 @@ wxCRT_StrtoullBase(const T* nptr, T** endptr, int base, T* sign) } } else - i--; + --i; } if ( base == 0 ) base = 10; - for ( ; i != end; i++ ) + for ( ; i != end; ++i ) { unsigned int n;