wxDFB compilation was broken by recent wxObjectRefData copy ctor-related
changes. Fix it by not using wxCursorRefData copy ctor any more, call
wxCursorRefData::Clone() which does the right thing explicitly instead.
Closes #12791.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66429
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
virtual bool IsOk() const { return m_bitmap.IsOk(); }
+ // Create a deep copy of this object.
+ wxCursorRefData *Clone() const
+ {
+ wxBitmap bitmapCopy(m_bitmap);
+ bitmapCopy.UnShare();
+
+ return new wxCursorRefData(bitmapCopy, m_id);
+ }
+
int m_id;
wxBitmap m_bitmap;
};
wxGDIRefData *wxCursor::CloneGDIRefData(const wxGDIRefData *data) const
{
- return new wxCursorRefData(*(wxCursorRefData *)data);
+ return static_cast<const wxCursorRefData *>(data)->Clone();
}