Eliminate -Wcast-qual warnings with GCC and Clang
Use const_cast, mutable, and various other changes to avoid -Wcast-qual
This commit is contained in:
@@ -199,8 +199,8 @@ void UnicodeTestCase::ConstructorsWithConversion()
|
||||
// the string "Déjà" in UTF-8 and wchar_t:
|
||||
const unsigned char utf8Buf[] = {0x44,0xC3,0xA9,0x6A,0xC3,0xA0,0};
|
||||
const unsigned char utf8subBuf[] = {0x44,0xC3,0xA9,0x6A,0}; // just "Déj"
|
||||
const char *utf8 = (char *)utf8Buf;
|
||||
const char *utf8sub = (char *)utf8subBuf;
|
||||
const char* utf8 = reinterpret_cast<const char*>(utf8Buf);
|
||||
const char* utf8sub = reinterpret_cast<const char*>(utf8subBuf);
|
||||
|
||||
wxString s1(utf8, wxConvUTF8);
|
||||
|
||||
|
Reference in New Issue
Block a user