X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/14f355c2b5c71fc7c3d680aea366582d2ac60f7b..f15fa3a93ffd477077d1255ebd9d6335758021c4:/src/generic/paletteg.cpp?ds=sidebyside diff --git a/src/generic/paletteg.cpp b/src/generic/paletteg.cpp index 7121430633..bc60473143 100644 --- a/src/generic/paletteg.cpp +++ b/src/generic/paletteg.cpp @@ -8,11 +8,6 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// - -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "paletteg.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -72,7 +67,7 @@ wxPalette::wxPalette(int n, const unsigned char *red, const unsigned char *green } wxPalette::wxPalette(const wxPalette& palette) - : wxGDIObject() + : wxPaletteBase() { Ref(palette); } @@ -88,12 +83,12 @@ wxPalette& wxPalette::operator = (const wxPalette& palette) return *this; } -bool wxPalette::operator == (const wxPalette& palette) +bool wxPalette::operator == (const wxPalette& palette) const { return m_refData == palette.m_refData; } -bool wxPalette::operator != (const wxPalette& palette) +bool wxPalette::operator != (const wxPalette& palette) const { return m_refData != palette.m_refData; } @@ -122,14 +117,14 @@ bool wxPalette::Create(int n, e->blue = blue[i]; } - return TRUE; + return true; } int wxPalette::GetPixel( const unsigned char red, const unsigned char green, const unsigned char blue ) const { - if (!m_refData) return FALSE; + if (!m_refData) return false; int closest = 0; double d,distance = 1000.0; // max. dist is 256 @@ -152,14 +147,14 @@ bool wxPalette::GetRGB(int pixel, unsigned char *green, unsigned char *blue) const { - if (!m_refData) return FALSE; - if (pixel >= M_PALETTEDATA->m_count) return FALSE; + if (!m_refData) return false; + if (pixel >= M_PALETTEDATA->m_count) return false; wxPaletteEntry& p = M_PALETTEDATA->m_entries[pixel]; if (red) *red = p.red; if (green) *green = p.green; if (blue) *blue = p.blue; - return TRUE; + return true; } #endif // wxUSE_PALETTE