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,13 +30,6 @@ public:
|
||||
|
||||
virtual ~wxAcceleratorTable();
|
||||
|
||||
#if WXWIN_COMPATIBILITY_2_4
|
||||
bool operator==(const wxAcceleratorTable& accel) const
|
||||
{ return m_refData == accel.m_refData; }
|
||||
bool operator!=(const wxAcceleratorTable& accel) const
|
||||
{ return !(*this == accel); }
|
||||
#endif
|
||||
|
||||
bool Ok() const { return IsOk(); }
|
||||
bool IsOk() const;
|
||||
void SetHACCEL(WXHACCEL hAccel);
|
||||
|
@@ -132,9 +132,6 @@ public:
|
||||
wxMask *GetMask() 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(); }
|
||||
|
@@ -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);
|
||||
|
||||
inline WXHPALETTE GetHPALETTE(void) const { return (M_PALETTEDATA ? M_PALETTEDATA->m_hPalette : 0); }
|
||||
|
@@ -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