X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0042c76f29969ec8de13ca51d337e80e70e337f1..66c2bf7b1d9326fb650acfaae22ec50528cfbf7c:/include/wx/gdiobj.h diff --git a/include/wx/gdiobj.h b/include/wx/gdiobj.h index da977d3939..903dfe083d 100644 --- a/include/wx/gdiobj.h +++ b/include/wx/gdiobj.h @@ -5,7 +5,6 @@ // Modified by: // Created: // Copyright: (c) Julian Smart -// RCS-ID: $Id$ // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// @@ -23,9 +22,16 @@ class WXDLLIMPEXP_CORE wxGDIRefData : public wxObjectRefData { public: + // Default ctor which needs to be defined just because we use + // wxDECLARE_NO_COPY_CLASS() below. + wxGDIRefData() { } + // override this in the derived classes to check if this data object is // really fully initialized virtual bool IsOk() const { return true; } + +private: + wxDECLARE_NO_COPY_CLASS(wxGDIRefData); }; // ---------------------------------------------------------------------------- @@ -40,7 +46,7 @@ public: { // the cast here is safe because the derived classes always create // wxGDIRefData objects - return m_refData && wx_static_cast(wxGDIRefData *, m_refData)->IsOk(); + return m_refData && static_cast(m_refData)->IsOk(); } // don't use in the new code, use IsOk() instead @@ -50,7 +56,7 @@ public: // because it's still widely used) bool Ok() const { return IsOk(); } -#if defined(__WXMSW__) || defined(__WXPM__) || defined(__WXPALMOS__) +#if defined(__WXMSW__) || defined(__WXPM__) // Creates the resource virtual bool RealizeResource() { return false; } @@ -74,7 +80,7 @@ protected: virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const { - return CloneGDIRefData(wx_static_cast(const wxGDIRefData *, data)); + return CloneGDIRefData(static_cast(data)); } virtual wxGDIRefData *CreateGDIRefData() const = 0;