X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f8855e47254a28f5141524b3aaaac03c2944e997..d6f2a8911e509fd9e61f881cc881a97f5aa05ae8:/src/generic/paletteg.cpp diff --git a/src/generic/paletteg.cpp b/src/generic/paletteg.cpp index 6ccfde5439..ac8cd8a83b 100644 --- a/src/generic/paletteg.cpp +++ b/src/generic/paletteg.cpp @@ -33,7 +33,7 @@ class wxPaletteRefData: public wxObjectRefData public: wxPaletteRefData(void); - ~wxPaletteRefData(void); + virtual ~wxPaletteRefData(void); int m_count; wxPaletteEntry *m_entries; @@ -70,19 +70,17 @@ wxPalette::~wxPalette() { } -bool wxPalette::operator == (const wxPalette& palette) const +bool wxPalette::IsOk() const { - return m_refData == palette.m_refData; -} - -bool wxPalette::operator != (const wxPalette& palette) const -{ - return m_refData != palette.m_refData; + return (m_refData != NULL); } -bool wxPalette::Ok(void) const +int wxPalette::GetColoursCount() const { - return (m_refData != NULL); + if (m_refData) + return M_PALETTEDATA->m_count; + + return 0; } bool wxPalette::Create(int n,