From ed077e17cff6aa823c9547d3052a089f3789bd7e Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 12 Apr 2020 16:32:58 +0200 Subject: [PATCH] Restore wxAnimation::GetFrame() constness This got lost, almost surely accidentally, in 706c8e8ad6 (Merge branch 'disable-native-animation', 2020-04-07), so just restore it now. See https://github.com/wxWidgets/wxWidgets/pull/1768 Closes #18725. --- include/wx/animate.h | 2 +- interface/wx/animate.h | 2 +- src/common/animatecmn.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/wx/animate.h b/include/wx/animate.h index f4de421c98..e643131577 100644 --- a/include/wx/animate.h +++ b/include/wx/animate.h @@ -48,7 +48,7 @@ public: int GetDelay(unsigned int frame) const; unsigned int GetFrameCount() const; - wxImage GetFrame(unsigned int frame); + wxImage GetFrame(unsigned int frame) const; wxSize GetSize() const; bool LoadFile(const wxString& name, wxAnimationType type = wxANIMATION_TYPE_ANY); diff --git a/interface/wx/animate.h b/interface/wx/animate.h index 3233ae0099..17c525a49f 100644 --- a/interface/wx/animate.h +++ b/interface/wx/animate.h @@ -381,7 +381,7 @@ public: This method is not implemented in the native wxGTK implementation of this class and always returns an invalid image there. */ - wxImage GetFrame(unsigned int frame); + wxImage GetFrame(unsigned int frame) const; /** Returns the size of the animation. diff --git a/src/common/animatecmn.cpp b/src/common/animatecmn.cpp index 48de7321aa..b56f91cee9 100644 --- a/src/common/animatecmn.cpp +++ b/src/common/animatecmn.cpp @@ -103,7 +103,7 @@ unsigned int wxAnimation::GetFrameCount() const return GetImpl()->GetFrameCount(); } -wxImage wxAnimation::GetFrame(unsigned int frame) +wxImage wxAnimation::GetFrame(unsigned int frame) const { wxCHECK_MSG( IsOk(), wxNullImage, wxT("invalid animation") ); return GetImpl()->GetFrame(frame);