X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/deb63b954bbf5fd364bc4c6bbabf0e815a677d95..550343399aa1355469ffed72c8cf84c732dcf98b:/src/os2/palette.cpp?ds=sidebyside diff --git a/src/os2/palette.cpp b/src/os2/palette.cpp index bf84af809f..dd48397fc9 100644 --- a/src/os2/palette.cpp +++ b/src/os2/palette.cpp @@ -6,7 +6,7 @@ // Created: ??/??/98 // RCS-ID: $Id$ // Copyright: (c) AUTHOR -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // For compilers that support precompilation, includes "wx.h". @@ -14,13 +14,16 @@ #ifndef WX_PRECOMP #include +#include "wx/defs.h" #include "wx/setup.h" +#include "wx/string.h" +#include "wx/os2/private.h" #include "wx/palette.h" +#include "wx/app.h" #endif #define INCL_PM #define INCL_GPI -#include #include "assert.h" @@ -65,24 +68,20 @@ wxPalette::~wxPalette() { } // end of wxPalette::~wxPalette -bool wxPalette::FreeResource( - bool bForce -) +bool wxPalette::FreeResource( bool WXUNUSED(bForce) ) { if ( M_PALETTEDATA && M_PALETTEDATA->m_hPalette) { ::GpiSelectPalette(M_PALETTEDATA->m_hPS, NULLHANDLE); ::GpiDeletePalette((HPAL)M_PALETTEDATA->m_hPalette); } - return TRUE; + return true; } // end of wxPalette::FreeResource -bool wxPalette::Create( - int n -, const unsigned char* pRed -, const unsigned char* pGreen -, const unsigned char* pBlue -) +bool wxPalette::Create( int n, + const unsigned char* pRed, + const unsigned char* pGreen, + const unsigned char* pBlue ) { PULONG pualTable; @@ -91,7 +90,7 @@ bool wxPalette::Create( m_refData = new wxPaletteRefData; pualTable = new ULONG[n]; if (!pualTable) - return(FALSE); + return false; for (int i = 0; i < n; i ++) { @@ -104,7 +103,7 @@ bool wxPalette::Create( ,pualTable ); delete [] pualTable; - return TRUE; + return true; } // end of wxPalette::Create int wxPalette::GetPixel( @@ -150,11 +149,12 @@ int wxPalette::GetPixel( // // Now loop through and find the matching entry // - for (int i = 0; i < ulNumEntries; i++) + ULONG i; + for (i = 0; i < ulNumEntries; i++) { if (pualTable[i] == ulRGB) { - bFound = TRUE; + bFound = true; break; } } @@ -230,4 +230,3 @@ void wxPalette::SetPS( ::GpiSelectPalette(M_PALETTEDATA->m_hPS, M_PALETTEDATA->m_hPalette); M_PALETTEDATA->m_hPS = hPS; } // end of wxPalette::SetHPALETTE -