Deprecate unused wxMBConv parameters in wxString functions
Some wxString functions using wide strings still took wxMBConv just for consistency with the same functions taking narrow strings in ANSI build, but this doesn't really make sense any longer because the same code can't be compiled with different values of wxChar -- it is always the same thing as wchar_t now, and so we shouldn't pass unused conversion objects to these functions any more. So give deprecation warning when these functions are used (but without formally deprecating them, as it doesn't cost much to keep them) and avoid using them in the library code.
This commit is contained in:
parent
f36e414072
commit
3bc0d1ed92
8 changed files with 23 additions and 18 deletions
|
|
@ -208,7 +208,7 @@ void UnicodeTestCase::ConstructorsWithConversion()
|
|||
wxString s3(utf8, wxConvUTF8, 4);
|
||||
CPPUNIT_ASSERT_EQUAL( sub, s3 );
|
||||
|
||||
wxString s4(wchar, wxConvUTF8, 3);
|
||||
wxString s4(wchar, 3);
|
||||
CPPUNIT_ASSERT_EQUAL( sub, s4 );
|
||||
|
||||
// conversion should stop with failure at pos 35
|
||||
|
|
@ -248,7 +248,7 @@ void UnicodeTestCase::ConversionWithNULs()
|
|||
{
|
||||
static const size_t lenNulString = 10;
|
||||
|
||||
wxString szTheString(L"The\0String", wxConvLibc, lenNulString);
|
||||
wxString szTheString(L"The\0String", lenNulString);
|
||||
wxCharBuffer theBuffer = szTheString.mb_str(wxConvLibc);
|
||||
|
||||
CPPUNIT_ASSERT( memcmp(theBuffer.data(), "The\0String",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue