[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

[XaraXtreme-commits] Commit Complete



Commit by  : alex
Repository : xara
Revision   : 1694
Date       : Sat Aug 12 20:00:41 BST 2006

Changed paths:
   M /Trunk/XaraLX/wxOil/dibutil.cpp

Remove egregious use of floating point


Diff:
Index: Trunk/XaraLX/wxOil/dibutil.cpp
===================================================================
--- Trunk/XaraLX/wxOil/dibutil.cpp	(revision 1693)
+++ Trunk/XaraLX/wxOil/dibutil.cpp	(revision 1694)
@@ -4713,7 +4713,7 @@
 
 	LPRGBQUAD		pPal	= pBitmap->GetPaletteForBitmap();
 	UINT32			Bpp		= pBitmap->GetBPP();
-	UINT32			PaletteSize = UINT32( pow( 2.0, double(Bpp) ) );
+	UINT32			PaletteSize = 1U<<Bpp;
 	LPLOGPALETTE	pLogPal = NULL;
 
 	// Bitmaps with more than 256 colours in usually do not require a palette


Xara