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:
Paul Cornett
2020-02-02 22:50:32 -08:00
parent 6724f8c052
commit 948ddc6e0f
115 changed files with 273 additions and 303 deletions

View File

@@ -2641,7 +2641,7 @@ bool wxImage::SaveFile( const wxString& WXUNUSED_UNLESS_STREAMS(filename),
#if HAS_FILE_STREAMS
wxCHECK_MSG( IsOk(), false, wxT("invalid image") );
((wxImage*)this)->SetOption(wxIMAGE_OPTION_FILENAME, filename);
const_cast<wxImage*>(this)->SetOption(wxIMAGE_OPTION_FILENAME, filename);
wxImageFileOutputStream stream(filename);
@@ -2661,7 +2661,7 @@ bool wxImage::SaveFile( const wxString& WXUNUSED_UNLESS_STREAMS(filename),
#if HAS_FILE_STREAMS
wxCHECK_MSG( IsOk(), false, wxT("invalid image") );
((wxImage*)this)->SetOption(wxIMAGE_OPTION_FILENAME, filename);
const_cast<wxImage*>(this)->SetOption(wxIMAGE_OPTION_FILENAME, filename);
wxImageFileOutputStream stream(filename);