]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/rgncmn.cpp
added GetWindowSizeForVirtualSize() virtual hook for wxScrolledWindow (cuts down...
[wxWidgets.git] / src / common / rgncmn.cpp
index 2b1b5b6600a5b234021b58cc2d7e1043524c1ae7..13bcd6e18440358fa5d9180325fe111bde4d0664 100644 (file)
@@ -9,11 +9,6 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "rgncmn.h"
-#endif
-
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
@@ -60,9 +55,9 @@ static bool DoRegionUnion(wxRegion& region,
 {
     unsigned char hiR, hiG, hiB;
 
-    hiR = wxMin(0xFF, loR + tolerance);
-    hiG = wxMin(0xFF, loG + tolerance);
-    hiB = wxMin(0xFF, loB + tolerance);
+    hiR = (unsigned char)wxMin(0xFF, loR + tolerance);
+    hiG = (unsigned char)wxMin(0xFF, loG + tolerance);
+    hiB = (unsigned char)wxMin(0xFF, loB + tolerance);
 
     // Loop through the image row by row, pixel by pixel, building up
     // rectangles to add to the region.
@@ -101,7 +96,7 @@ static bool DoRegionUnion(wxRegion& region,
 
     return true;
 }
+
 
 bool wxRegion::Union(const wxBitmap& bmp)
 {