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);