COW cleanup patch (1583966):
1. perform deep comparison for the classes for which it makes sense in the ports where this wasn't done yet 2. remove (shallow) comparison operators for the classes for which it does not make sense (such as wxBitmap) 3. makes wxBitmap use COW on all ports 4. adds wxObject::IsRefTo() 5. centralizes and improves COW docs git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42752 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -30,10 +30,6 @@ public:
|
||||
// initialize from array
|
||||
wxAcceleratorTable(int n, const wxAcceleratorEntry entries[]);
|
||||
|
||||
bool operator==(const wxAcceleratorTable& accel) const;
|
||||
bool operator!=(const wxAcceleratorTable& accel) const
|
||||
{ return !(*this == accel); }
|
||||
|
||||
bool Ok() const { return IsOk(); }
|
||||
bool IsOk() const;
|
||||
void SetHACCEL(WXHACCEL hAccel);
|
||||
|
@@ -139,9 +139,6 @@ public:
|
||||
wxBitmap GetMaskBitmap() const;
|
||||
void SetMask(wxMask *mask);
|
||||
|
||||
bool operator==(const wxBitmap& bitmap) const { return m_refData == bitmap.m_refData; }
|
||||
bool operator!=(const wxBitmap& bitmap) const { return m_refData != bitmap.m_refData; }
|
||||
|
||||
// these functions are internal and shouldn't be used, they risk to
|
||||
// disappear in the future
|
||||
bool HasAlpha() const;
|
||||
|
@@ -32,10 +32,6 @@ public:
|
||||
wxCursor(int idCursor);
|
||||
virtual ~wxCursor();
|
||||
|
||||
bool operator==(const wxCursor& cursor) const;
|
||||
bool operator!=(const wxCursor& cursor) const
|
||||
{ return !(*this == cursor); }
|
||||
|
||||
// implementation only
|
||||
void SetHCURSOR(WXHCURSOR cursor) { SetHandle((WXHANDLE)cursor); }
|
||||
WXHCURSOR GetHCURSOR() const { return (WXHCURSOR)GetHandle(); }
|
||||
|
@@ -65,11 +65,6 @@ public:
|
||||
long type = wxBITMAP_TYPE_ICO_RESOURCE,
|
||||
int desiredWidth = -1, int desiredHeight = -1);
|
||||
|
||||
bool operator == (const wxIcon& icon) const
|
||||
{ return m_refData == icon.m_refData; }
|
||||
bool operator != (const wxIcon& icon) const
|
||||
{ return m_refData != icon.m_refData; }
|
||||
|
||||
// implementation only from now on
|
||||
wxIconRefData *GetIconData() const { return (wxIconRefData *)m_refData; }
|
||||
|
||||
|
@@ -68,12 +68,6 @@ public:
|
||||
int GetWindowsMappingMode() const { return M_METAFILEDATA->m_windowsMappingMode; }
|
||||
void SetWindowsMappingMode(int mm);
|
||||
|
||||
// Operators
|
||||
bool operator==(const wxMetafile& metafile) const
|
||||
{ return m_refData == metafile.m_refData; }
|
||||
bool operator!=(const wxMetafile& metafile) const
|
||||
{ return m_refData != metafile.m_refData; }
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxMetafile)
|
||||
};
|
||||
|
@@ -44,9 +44,6 @@ public:
|
||||
virtual bool Ok() const { return IsOk(); }
|
||||
virtual bool IsOk(void) const { return (m_refData != NULL) ; }
|
||||
|
||||
inline bool operator == (const wxPalette& palette) const { return m_refData == palette.m_refData; }
|
||||
inline bool operator != (const wxPalette& palette) const { return m_refData != palette.m_refData; }
|
||||
|
||||
virtual bool FreeResource(bool force = false);
|
||||
|
||||
// implemetation
|
||||
|
@@ -36,7 +36,7 @@ public:
|
||||
m_join == data.m_join &&
|
||||
m_cap == data.m_cap &&
|
||||
m_colour == data.m_colour &&
|
||||
(m_style != wxSTIPPLE || m_stipple == data.m_stipple) &&
|
||||
(m_style != wxSTIPPLE || m_stipple.IsRefTo(&data.m_stipple)) &&
|
||||
(m_style != wxUSER_DASH ||
|
||||
(m_nbDash == data.m_nbDash &&
|
||||
memcmp(m_dash, data.m_dash, m_nbDash*sizeof(wxDash)) == 0));
|
||||
|
Reference in New Issue
Block a user