]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/dc.cpp
remove always-true test of unsigned >= 0
[wxWidgets.git] / src / os2 / dc.cpp
index c8fec9f68f9149d60307a3c988b730da12c9cbd5..ab1b0ad71813eed161dfbc606298aaa2b84957c0 100644 (file)
@@ -444,7 +444,7 @@ void wxPMDCImpl::DoSetClippingRegion(
     DO_SET_CLIPPING_BOX()
 } // end of wxPMDCImpl::DoSetClippingRegion
 
-void wxPMDCImpl::DoSetClippingRegionAsRegion(
+void wxPMDCImpl::DoSetDeviceClippingRegion(
   const wxRegion&                   rRegion
 )
 {
@@ -457,7 +457,7 @@ void wxPMDCImpl::DoSetClippingRegionAsRegion(
                         ,&hRgnOld
                        );
     DO_SET_CLIPPING_BOX()
-} // end of wxPMDCImpl::DoSetClippingRegionAsRegion
+} // end of wxPMDCImpl::DoSetDeviceClippingRegion
 
 void wxPMDCImpl::DestroyClippingRegion(void)
 {
@@ -540,7 +540,7 @@ bool wxPMDCImpl::DoFloodFill(
   wxCoord                           vX
 , wxCoord                           vY
 , const wxColour&                   rCol
-, int                               nStyle
+, wxFloodFillStyle                  nStyle
 )
 {
     POINTL                          vPtlPos;
@@ -839,7 +839,7 @@ void wxPMDCImpl::DoDrawPolygon( int n,
                           wxPoint vPoints[],
                           wxCoord vXoffset,
                           wxCoord vYoffset,
-                          int nFillStyle )
+                          wxPolygonFillMode nFillStyle )
 {
     ULONG     ulCount = 1;    // Number of polygons.
     POLYGON   vPlgn;          // polygon.
@@ -1579,6 +1579,7 @@ void wxPMDCImpl::DoDrawBitmap(
                 {
                     vError = ::WinGetLastError(vHabmain);
                     sError = wxPMErrorToStr(vError);
+                    delete [] pucBits;
                     return;
                 }
                 if ((lScans = ::GpiQueryBitmapBits( hPS
@@ -1590,6 +1591,7 @@ void wxPMDCImpl::DoDrawBitmap(
                 {
                     vError = ::WinGetLastError(vHabmain);
                     sError = wxPMErrorToStr(vError);
+                    delete [] pucBits;
                     return;
                 }
                 unsigned char           cOldRedFore   = (unsigned char)(lOldForeGround >> 16);
@@ -2017,7 +2019,7 @@ void wxPMDCImpl::SetBackgroundMode(int nMode)
     m_backgroundMode = nMode;
 } // end of wxPMDCImpl::SetBackgroundMode
 
-void wxPMDCImpl::SetLogicalFunction(int nFunction)
+void wxPMDCImpl::SetLogicalFunction(wxRasterOperationMode nFunction)
 {
     m_logicalFunction = nFunction;
     SetRop((WXHDC)m_hDC);
@@ -2160,12 +2162,12 @@ void wxPMDCImpl::DoGetTextExtent(
     //
     if (!m_hPS)
     {
-       (void)wxMessageBox( _T("wxWidgets core library")
-                           ,"Using uninitialized DC for measuring text!\n"
-                           ,wxICON_INFORMATION
-                           );
+    (void)wxMessageBox( wxT("wxWidgets core library")
+                ,"Using uninitialized DC for measuring text!\n"
+                ,wxICON_INFORMATION
+                );
     }
-       
+
     bRc = ::GpiQueryTextBox( m_hPS
                             ,l
                             ,rsString.char_str()
@@ -2177,8 +2179,8 @@ void wxPMDCImpl::DoGetTextExtent(
        vErrorCode = ::WinGetLastError(wxGetInstance());
        sError = wxPMErrorToStr(vErrorCode);
        // DEBUG
-       wxSprintf(zMsg, _T("GpiQueryTextBox for %s: failed with Error: %lx - %s"), rsString.c_str(), vErrorCode, sError.c_str());
-       (void)wxMessageBox( _T("wxWidgets core library")
+       wxSprintf(zMsg, wxT("GpiQueryTextBox for %s: failed with Error: %lx - %s"), rsString.c_str(), vErrorCode, sError.c_str());
+       (void)wxMessageBox( wxT("wxWidgets core library")
                           ,zMsg
                           ,wxICON_INFORMATION
                          );
@@ -2211,7 +2213,7 @@ void wxPMDCImpl::DoGetTextExtent(
 }
 
 void wxPMDCImpl::SetMapMode(
-  int                               nMode
+  wxMappingMode                     nMode
 )
 {
     int                             nPixelWidth = 0;
@@ -2285,7 +2287,7 @@ void wxPMDCImpl::SetMapMode(
         ::GpiSetPS(m_hPS, &vSize, ulOptions);
     }
     ComputeScaleAndOrigin();
-    
+
 }; // end of wxPMDCImpl::SetMapMode
 
 void wxPMDCImpl::SetUserScale( double dX,
@@ -2357,7 +2359,7 @@ bool wxPMDCImpl::DoBlit( wxCoord vXdest,
                    wxDC*   pSource,
                    wxCoord vXsrc,
                    wxCoord vYsrc,
-                   int     nRop,
+                   wxRasterOperationMode     nRop,
                    bool    bUseMask,
                    wxCoord WXUNUSED(vXsrcMask),
                    wxCoord WXUNUSED(vYsrcMask) )