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
This commit is contained in:
@@ -768,15 +768,14 @@ void MBConvTestCase::TestCoder(
|
|||||||
// so we should store the wide character version as UTF-8 and depend on
|
// 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
|
// 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
|
// this test is invalid if the UTF-8 converter can't decode
|
||||||
wxWCharBuffer wideBuffer((size_t)0);
|
const wxWCharBuffer wideBuffer(DecodeUTF8(utf8Buffer, utf8Bytes));
|
||||||
wideBuffer = DecodeUTF8( utf8Buffer, utf8Bytes );
|
const size_t wideChars = wxWcslen(wideBuffer);
|
||||||
size_t wideChars = wxWcslen( wideBuffer.data() );
|
|
||||||
|
|
||||||
TestDecoder
|
TestDecoder
|
||||||
(
|
(
|
||||||
wideBuffer.data(),
|
wideBuffer.data(),
|
||||||
wideChars,
|
wideChars,
|
||||||
(const char*)multiBuffer,
|
multiBuffer,
|
||||||
multiBytes,
|
multiBytes,
|
||||||
converter,
|
converter,
|
||||||
sizeofNull
|
sizeofNull
|
||||||
@@ -785,7 +784,7 @@ void MBConvTestCase::TestCoder(
|
|||||||
(
|
(
|
||||||
wideBuffer.data(),
|
wideBuffer.data(),
|
||||||
wideChars,
|
wideChars,
|
||||||
(const char*)multiBuffer,
|
multiBuffer,
|
||||||
multiBytes,
|
multiBytes,
|
||||||
converter,
|
converter,
|
||||||
sizeofNull
|
sizeofNull
|
||||||
|
Reference in New Issue
Block a user