X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/77ffb5937e89927b621128789401db8921fe580f..e15f0a5ea372e3a6c693fb6aa4fe73893a9af797:/src/os2/pen.cpp diff --git a/src/os2/pen.cpp b/src/os2/pen.cpp index 4a1063dffd..91efcb3ab3 100644 --- a/src/os2/pen.cpp +++ b/src/os2/pen.cpp @@ -1,12 +1,12 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: pen.cpp +// Name: src/os2/pen.cpp // Purpose: wxPen // Author: David Webster // Modified by: // Created: 10/10/99 // RCS-ID: $Id$ // Copyright: (c) David Webster -// Licence: wxWidgets licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // For compilers that support precompilation, includes "wx.h". @@ -151,16 +151,16 @@ bool wxPen::RealizeResource() { vError = ::WinGetLastError(vHabmain); sError = wxPMErrorToStr(vError); - wxLogError("Unable to set current color table to RGB mode. Error: %s\n", sError.c_str()); - return FALSE; + wxLogError(_T("Unable to set current color table to RGB mode. Error: %s\n"), sError.c_str()); + return false; } if (M_PENDATA->m_nStyle == wxTRANSPARENT) { - return TRUE; + return true; } - COLORREF vPmColour = 0L; - USHORT uLineType = wx2os2PenStyle(M_PENDATA->m_nStyle); + COLORREF vPmColour = 0L; + USHORT uLineType = (USHORT)wx2os2PenStyle(M_PENDATA->m_nStyle); vPmColour = M_PENDATA->m_vColour.GetPixel(); @@ -215,8 +215,8 @@ bool wxPen::RealizeResource() { vError = ::WinGetLastError(vHabmain); sError = wxPMErrorToStr(vError); - wxLogError("Can't set Gpi attributes for a LINEBUNDLE. Error: %s\n", sError.c_str()); - return FALSE; + wxLogError(_T("Can't set Gpi attributes for a LINEBUNDLE. Error: %s\n"), sError.c_str()); + return false; } ULONG flAttrMask = 0L; @@ -300,11 +300,12 @@ bool wxPen::RealizeResource() { vError = ::WinGetLastError(vHabmain); sError = wxPMErrorToStr(vError); - wxLogError("Can't set Gpi attributes for an AREABUNDLE. Error: %s\n", sError.c_str()); + wxLogError(_T("Can't set Gpi attributes for an AREABUNDLE. Error: %s\n"), sError.c_str()); } - return bOk; + + return (bool)bOk; } - return FALSE; + return false; } // end of wxPen::RealizeResource WXHANDLE wxPen::GetResourceHandle() @@ -315,16 +316,14 @@ WXHANDLE wxPen::GetResourceHandle() return (WXHANDLE)M_PENDATA->m_hPen; } // end of wxPen::GetResourceHandle -bool wxPen::FreeResource( - bool bForce -) +bool wxPen::FreeResource( bool WXUNUSED(bForce) ) { if (M_PENDATA && (M_PENDATA->m_hPen != 0)) { M_PENDATA->m_hPen = 0; - return TRUE; + return true; } - else return FALSE; + else return false; } // end of wxPen::FreeResource bool wxPen::IsFree() const @@ -347,29 +346,21 @@ void wxPen::Unshare() } } // end of wxPen::Unshare -void wxPen::SetColour( - const wxColour& rColour -) +void wxPen::SetColour( const wxColour& rColour ) { Unshare(); M_PENDATA->m_vColour = rColour; RealizeResource(); } // end of wxPen::SetColour -void wxPen::SetColour( - unsigned char cRed -, unsigned char cGreen -, unsigned char cBlue -) +void wxPen::SetColour( unsigned char cRed, unsigned char cGreen, unsigned char cBlue) { Unshare(); M_PENDATA->m_vColour.Set(cRed, cGreen, cBlue); RealizeResource(); } // end of wxPen::SetColour -void wxPen::SetPS( - HPS hPS -) +void wxPen::SetPS( HPS hPS ) { Unshare(); if (M_PENDATA->m_hPen) @@ -406,10 +397,8 @@ void wxPen::SetStipple( RealizeResource(); } // end of wxPen::SetStipple -void wxPen::SetDashes( - int nNbDashes -, const wxDash* pDash -) +void wxPen::SetDashes( int WXUNUSED(nNbDashes), + const wxDash* WXUNUSED(pDash) ) { // // Does nothing under OS/2 @@ -473,5 +462,3 @@ int wx2os2PenStyle( } return nPMStyle; } // end of wx2os2PenStyle - -