From 902a2f08859a0d912aff0562cdaea5a63560124a Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Mon, 6 Apr 2020 20:26:49 -0700 Subject: [PATCH] Remove wxAnimation copy ctor and copy-assignment operator implementations The compiler-generated defaults will do the same thing --- include/wx/animate.h | 6 ++++-- src/common/animatecmn.cpp | 15 --------------- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/include/wx/animate.h b/include/wx/animate.h index 6c076f3b85..f4de421c98 100644 --- a/include/wx/animate.h +++ b/include/wx/animate.h @@ -37,9 +37,11 @@ class WXDLLIMPEXP_CORE wxAnimation : public wxObject public: wxAnimation(); explicit wxAnimation(const wxString &name, wxAnimationType type = wxANIMATION_TYPE_ANY); - wxAnimation(const wxAnimation& other); - wxAnimation& operator=(const wxAnimation& other); +#if __cplusplus >= 201103 + wxAnimation(const wxAnimation&) = default; + wxAnimation& operator=(const wxAnimation&) = default; +#endif bool IsOk() const; bool IsCompatibleWith(wxClassInfo* ci) const; diff --git a/src/common/animatecmn.cpp b/src/common/animatecmn.cpp index 9e74a365a9..48de7321aa 100644 --- a/src/common/animatecmn.cpp +++ b/src/common/animatecmn.cpp @@ -74,21 +74,6 @@ wxAnimation::wxAnimation(const wxString &name, wxAnimationType type) LoadFile(name, type); } -wxAnimation::wxAnimation(const wxAnimation& other) -{ - Ref(other); -} - -wxAnimation& wxAnimation::operator=(const wxAnimation& other) -{ - if (this != &other) - { - UnRef(); - Ref(other); - } - return *this; -} - wxAnimationImpl* wxAnimation::GetImpl() const { return static_cast(m_refData);