]> git.saurik.com Git - wxWidgets.git/commitdiff
No real changes, just simplify some MBConvTestCase code.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 3 Oct 2010 17:15:31 +0000 (17:15 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 3 Oct 2010 17:15:31 +0000 (17:15 +0000)
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

index e3870f41ea5f98dbc49f3cc470c96d3432a6931d..b413b5bdbd21307a344843b34fc2f0e205490a47 100644 (file)
@@ -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