diff --git a/include/wx/bmpbndl.h b/include/wx/bmpbndl.h index e55ba08f44..6657fb8056 100644 --- a/include/wx/bmpbndl.h +++ b/include/wx/bmpbndl.h @@ -100,7 +100,7 @@ public: // Get preferred size, i.e. usually the closest size in which a bitmap is // available to the ideal size determined from the default size and the DPI // scaling, for the given window. - wxSize GetPreferredSizeFor(wxWindow* window) const; + wxSize GetPreferredSizeFor(const wxWindow* window) const; wxSize GetPreferredSizeAtScale(double scale) const; // Get bitmap of the specified size, creating a new bitmap from the closest diff --git a/interface/wx/bmpbndl.h b/interface/wx/bmpbndl.h index c9392657fa..5e8b111358 100644 --- a/interface/wx/bmpbndl.h +++ b/interface/wx/bmpbndl.h @@ -275,7 +275,7 @@ public: @param window Non-null and fully created window. */ - wxSize GetPreferredSizeFor(wxWindow* window) const; + wxSize GetPreferredSizeFor(const wxWindow* window) const; /** Get bitmap of the specified size, creating a new bitmap from the closest diff --git a/src/common/bmpbndl.cpp b/src/common/bmpbndl.cpp index af6702d08a..202c1fc435 100644 --- a/src/common/bmpbndl.cpp +++ b/src/common/bmpbndl.cpp @@ -375,7 +375,7 @@ wxSize wxBitmapBundle::GetDefaultSize() const return m_impl->GetDefaultSize(); } -wxSize wxBitmapBundle::GetPreferredSizeFor(wxWindow* window) const +wxSize wxBitmapBundle::GetPreferredSizeFor(const wxWindow* window) const { wxCHECK_MSG( window, wxDefaultSize, "window must be valid" );