Add assignment operator to wxAnimation
This commit is contained in:
@@ -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); }
|
||||
|
||||
|
@@ -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") );
|
||||
|
Reference in New Issue
Block a user