// headers
// ----------------------------------------------------------------------------
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
- #pragma implementation "strconv.h"
-#endif
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
wxLogTrace(TRACE_STRCONV,
wxT("iconv wchar_t charset is \"%s\"%s"),
- ms_wcCharsetName.empty() ? "<none>"
+ ms_wcCharsetName.empty() ? _T("<none>")
: ms_wcCharsetName.c_str(),
ms_wcNeedsSwap ? _T(" (needs swap)")
: _T(""));
wxMutexLocker lock(wxConstCast(this, wxMBConv_iconv)->m_iconvMutex);
#endif
- size_t inbuf = wxWcslen(psz) * SIZEOF_WCHAR_T;
+ size_t inlen = wxWcslen(psz);
+ size_t inbuf = inlen * SIZEOF_WCHAR_T;
size_t outbuf = n;
size_t res, cres;
// (doing WC_BSWAP twice on the original buffer won't help, as it
// could be in read-only memory, or be accessed in some other thread)
tmpbuf = (wchar_t *)malloc(inbuf + SIZEOF_WCHAR_T);
- for ( size_t n = 0; n < inbuf; n++ )
+ for ( size_t n = 0; n < inlen; n++ )
tmpbuf[n] = WC_BSWAP(psz[n]);
- tmpbuf[inbuf] = L'\0';
+ tmpbuf[inlen] = L'\0';
psz = tmpbuf;
}