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

[XaraXtreme-commits] Commit Complete



Commit by  : alex
Repository : xara
Revision   : 1676
Date       : Mon Aug  7 20:49:36 BST 2006

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

Convert obvious case of endianism


Diff:
Index: Trunk/XaraLX/wxOil/grndrgn.cpp
===================================================================
--- Trunk/XaraLX/wxOil/grndrgn.cpp	(revision 1675)
+++ Trunk/XaraLX/wxOil/grndrgn.cpp	(revision 1676)
@@ -7524,13 +7524,15 @@
 	}
 	else
 	{
+		const RGBQUAD TOnly = {0, 0, 0, 0xFF}; ; // 0xFF000000 on LittleEndian;
+		const DWORD DTOnly = *(DWORD *)(&TOnly);
 		// First we need to set all the pixels as transparent
 		DWORD* pPixel = (DWORD*)WinBM->BMBytes;
 		for (INT32 y = 0; y < Height; y++)
 		{
 			for (INT32 x = 0; x < Width; x++)
 			{
-				*(pPixel++) |= 0xFF000000;
+				*(pPixel++) |= DTOnly;
 			}
 		}
 


Xara