]> git.saurik.com Git - wxWidgets.git/commitdiff
compilation warning fixed
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 24 Jul 2001 19:33:55 +0000 (19:33 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 24 Jul 2001 19:33:55 +0000 (19:33 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11173 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/dc.cpp

index 0f31dee21b8223d925d4ee4e7b4fd92e188811dd..721a1fb3c7562cd85ff0deb67d90a2083a320201 100644 (file)
@@ -1705,30 +1705,25 @@ bool wxDC::DoBlit(wxCoord xdest, wxCoord ydest,
             HBITMAP buffer_bmap ;
 
 #if wxUSE_DC_CACHEING
-            if (TRUE)
-            {
-                // create a temp buffer bitmap and DCs to access it and the mask
-                wxDCCacheEntry* dcCacheEntry1 = FindDCInCache(NULL, source->GetHDC());
-                dc_mask = (HDC) dcCacheEntry1->m_dc;
-
-                wxDCCacheEntry* dcCacheEntry2 = FindDCInCache(dcCacheEntry1, GetHDC());
-                dc_buffer = (HDC) dcCacheEntry2->m_dc;
-
-                wxDCCacheEntry* bitmapCacheEntry = FindBitmapInCache(GetHDC(),
-                    width, height);
-
-                buffer_bmap = (HBITMAP) bitmapCacheEntry->m_bitmap;
-            }
-            else
-#endif
-            {
-                // create a temp buffer bitmap and DCs to access it and the mask
-                dc_mask = ::CreateCompatibleDC(GetHdcOf(*source));
-                dc_buffer = ::CreateCompatibleDC(GetHdc());
-                buffer_bmap = ::CreateCompatibleBitmap(GetHdc(), width, height);
-                ::SelectObject(dc_mask, (HBITMAP) mask->GetMaskBitmap());
-                ::SelectObject(dc_buffer, buffer_bmap);
-            }
+            // create a temp buffer bitmap and DCs to access it and the mask
+            wxDCCacheEntry* dcCacheEntry1 = FindDCInCache(NULL, source->GetHDC());
+            dc_mask = (HDC) dcCacheEntry1->m_dc;
+
+            wxDCCacheEntry* dcCacheEntry2 = FindDCInCache(dcCacheEntry1, GetHDC());
+            dc_buffer = (HDC) dcCacheEntry2->m_dc;
+
+            wxDCCacheEntry* bitmapCacheEntry = FindBitmapInCache(GetHDC(),
+                width, height);
+
+            buffer_bmap = (HBITMAP) bitmapCacheEntry->m_bitmap;
+#else // !wxUSE_DC_CACHEING
+            // create a temp buffer bitmap and DCs to access it and the mask
+            dc_mask = ::CreateCompatibleDC(GetHdcOf(*source));
+            dc_buffer = ::CreateCompatibleDC(GetHdc());
+            buffer_bmap = ::CreateCompatibleBitmap(GetHdc(), width, height);
+            ::SelectObject(dc_mask, (HBITMAP) mask->GetMaskBitmap());
+            ::SelectObject(dc_buffer, buffer_bmap);
+#endif // wxUSE_DC_CACHEING/!wxUSE_DC_CACHEING
 
             // copy dest to buffer
             if ( !::BitBlt(dc_buffer, 0, 0, (int)width, (int)height,