Add assignment operator to wxAnimation

This commit is contained in:
Robin Dunn
2020-04-02 14:35:30 -07:00
parent 80c9513a80
commit 784f330838
2 changed files with 12 additions and 0 deletions

View File

@@ -71,6 +71,8 @@ public:
wxAnimationImplType implType = wxANIMATION_IMPL_TYPE_NATIVE);
wxAnimation(const wxAnimation& other);
wxAnimation& operator=(const wxAnimation& other);
wxAnimationImpl* GetImpl() const
{ return static_cast<wxAnimationImpl*>(m_refData); }

View File

@@ -63,6 +63,16 @@ wxAnimation::wxAnimation(const wxAnimation& other)
Ref(other);
}
wxAnimation& wxAnimation::operator=(const wxAnimation& other)
{
if (this != &other)
{
UnRef();
Ref(other);
}
return *this;
}
int wxAnimation::GetDelay(unsigned int frame) const
{
wxCHECK_MSG( IsOk(), -1, wxT("invalid animation") );