X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/655719367ac5e131d9642e5783f3ecf64d1a3385..56d74412d9bc8d61c389ddb3919f2a03e610a376:/src/mac/carbon/palette.cpp?ds=sidebyside diff --git a/src/mac/carbon/palette.cpp b/src/mac/carbon/palette.cpp index 60a0de6a8a..d6295de46a 100644 --- a/src/mac/carbon/palette.cpp +++ b/src/mac/carbon/palette.cpp @@ -9,19 +9,17 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "palette.h" #endif -#include "wx/defs.h" +#include "wx/wxprec.h" #if wxUSE_PALETTE #include "wx/palette.h" -#if !USE_SHARED_LIBRARIES IMPLEMENT_DYNAMIC_CLASS(wxPalette, wxGDIObject) -#endif /* * Palette @@ -83,7 +81,7 @@ int wxPalette::GetPixel(const unsigned char red, const unsigned char green, cons for ( int i = 0 ; i < M_PALETTEDATA->m_count ; ++i ) { - const wxColour& col = &M_PALETTEDATA->m_palette[i] ; + const wxColour& col = M_PALETTEDATA->m_palette[i] ; currentdiff = abs ( col.Red() - red ) + abs( col.Green() - green ) + abs ( col.Blue() - blue ) ; if ( currentdiff < bestdiff ) { @@ -105,7 +103,7 @@ bool wxPalette::GetRGB(int index, unsigned char *red, unsigned char *green, unsi if (index < 0 || index >= M_PALETTEDATA->m_count) return FALSE; - const wxColour& col = &M_PALETTEDATA->m_palette[index] ; + const wxColour& col = M_PALETTEDATA->m_palette[index] ; *red = col.Red() ; *green = col.Green() ; *blue = col.Blue() ;