From cbc2233eb9f3a89519147e530e5341491e5674dd Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 3 Oct 2010 17:15:31 +0000 Subject: [PATCH] No real changes, just simplify some MBConvTestCase code. Remove unnecessary casts and initialize the variable with its contents directly instead of using strange looking wxWCharBuffer ctor from size_t (even if it did work, it was unnecessary). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65741 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- tests/mbconv/mbconvtest.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/mbconv/mbconvtest.cpp b/tests/mbconv/mbconvtest.cpp index e3870f4..b413b5b 100644 --- a/tests/mbconv/mbconvtest.cpp +++ b/tests/mbconv/mbconvtest.cpp @@ -768,15 +768,14 @@ void MBConvTestCase::TestCoder( // so we should store the wide character version as UTF-8 and depend on // the UTF-8 converter's ability to decode it to platform specific wide characters // this test is invalid if the UTF-8 converter can't decode - wxWCharBuffer wideBuffer((size_t)0); - wideBuffer = DecodeUTF8( utf8Buffer, utf8Bytes ); - size_t wideChars = wxWcslen( wideBuffer.data() ); + const wxWCharBuffer wideBuffer(DecodeUTF8(utf8Buffer, utf8Bytes)); + const size_t wideChars = wxWcslen(wideBuffer); TestDecoder ( wideBuffer.data(), wideChars, - (const char*)multiBuffer, + multiBuffer, multiBytes, converter, sizeofNull @@ -785,7 +784,7 @@ void MBConvTestCase::TestCoder( ( wideBuffer.data(), wideChars, - (const char*)multiBuffer, + multiBuffer, multiBytes, converter, sizeofNull -- 2.7.4