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

[XaraXtreme-commits] Commit Complete



Commit by  : alex
Repository : xara
Revision   : 1183
Date       : Tue May 23 20:26:23 BST 2006

Changed paths:
   M /Trunk/XaraLX/Kernel/coldlog.cpp
   M /Trunk/XaraLX/Kernel/ngcore.cpp
   M /Trunk/XaraLX/Kernel/range.cpp
   M /Trunk/XaraLX/Kernel/tracergn.cpp
   M /Trunk/XaraLX/wxOil/bfxpixop.cpp

Fix build warnings


Diff:
Index: Trunk/XaraLX/Kernel/tracergn.cpp
===================================================================
--- Trunk/XaraLX/Kernel/tracergn.cpp	(revision 1182)
+++ Trunk/XaraLX/Kernel/tracergn.cpp	(revision 1183)
@@ -837,7 +837,7 @@
 		NewDirection = (HeadDirection-(AtCusp?1:3)) & TR_NUMDIRECTIONMASK;
 		//NewDirection = (HeadDirection-3) & TR_NUMDIRECTIONMASK;
 		Turns=0;
-		TraceBoundaryPoint NewPoint;
+		TraceBoundaryPoint NewPoint=HeadPoint; // Initialisation unnecessary but quiets the compiler
 		
 		
 		do
Index: Trunk/XaraLX/Kernel/coldlog.cpp
===================================================================
--- Trunk/XaraLX/Kernel/coldlog.cpp	(revision 1182)
+++ Trunk/XaraLX/Kernel/coldlog.cpp	(revision 1183)
@@ -7627,8 +7627,8 @@
 
 
 	BOOL ColourHasChanged = FALSE;
-	INT32 XPos;
-	INT32 YPos;
+	INT32 XPos=0;
+	INT32 YPos=0;
 
 	// Handle the new mouse position, using the area the drag started in (rather than
 	// the area it may now be over) to determine which components to alter
@@ -7659,18 +7659,18 @@
 			if (XPos < 0)		XPos = 0;
 			if (XPos > Size)	XPos = Size;
 
-if (bHSVHueAtTop)
-{
-			YPos = Info->pMousePos->y - ValSatSquare.lo.y;
-			if (YPos < 0)		YPos = 0;
-			if (YPos > Size)	YPos = Size;
-}
-else
-{
-			YPos = ValSatSquare.hi.y - Info->pMousePos->y;
-			if (YPos < 0)		YPos = 0;
-			if (YPos > Size)	YPos = Size;
-}
+			if (bHSVHueAtTop)
+			{
+				YPos = Info->pMousePos->y - ValSatSquare.lo.y;
+				if (YPos < 0)		YPos = 0;
+				if (YPos > Size)	YPos = Size;
+			}
+			else
+			{
+				YPos = ValSatSquare.hi.y - Info->pMousePos->y;
+				if (YPos < 0)		YPos = 0;
+				if (YPos > Size)	YPos = Size;
+			}
 
 			double NewSat = ((double)XPos) / ((double) Size);
 			double NewVal = ((double)YPos) / ((double) Size);
Index: Trunk/XaraLX/Kernel/ngcore.cpp
===================================================================
--- Trunk/XaraLX/Kernel/ngcore.cpp	(revision 1182)
+++ Trunk/XaraLX/Kernel/ngcore.cpp	(revision 1183)
@@ -2093,9 +2093,9 @@
 {
 	TRACEUSER( "GerryX", _T("ShuffleBar(%d)
"), BarNumber);
 
-	DocCoord NextPos;
-	DocCoord FirstButtonPos;
-	DocCoord FirstButtonSubPixPos;
+	DocCoord NextPos(0,0);
+	DocCoord FirstButtonPos(0,0);
+	DocCoord FirstButtonSubPixPos(0,0);
 	DocRect	rBounds;
 	
 	SGNameItem * Order[MAX_BUTTONS_IN_A_BAR];
Index: Trunk/XaraLX/Kernel/range.cpp
===================================================================
--- Trunk/XaraLX/Kernel/range.cpp	(revision 1182)
+++ Trunk/XaraLX/Kernel/range.cpp	(revision 1183)
@@ -2606,7 +2606,7 @@
 				if (CurrentObject->RequiresAttrib(CommonAttrItem->AttrType, CompoundAccuracy)) 
 				{
 					// Find the attribute which is applied to the CurrentObject
-					void* vpAttr;
+					void* vpAttr=NULL;
 					NodeAttribute* pAttrNode;
 					pAttrMap->Lookup(CommonAttrItem->AttrType, vpAttr);
 					pAttrNode = (NodeAttribute*)vpAttr;
Index: Trunk/XaraLX/wxOil/bfxpixop.cpp
===================================================================
--- Trunk/XaraLX/wxOil/bfxpixop.cpp	(revision 1182)
+++ Trunk/XaraLX/wxOil/bfxpixop.cpp	(revision 1183)
@@ -1398,12 +1398,14 @@
 			 	count++;
 				ERROR3IF(pChild->pParent != pCheck, "Bad parent link");
 				ERROR3IF(pChild->Depth != d+1, "Bad child depth");
+#ifdef _DEBUG // avoid unused variable warnings
 				INT32 R=pCheck->R + ((cc&1)?halfwidth:0);
 				INT32 G=pCheck->G + ((cc&2)?halfwidth:0);				
 				INT32 B=pCheck->B + ((cc&4)?halfwidth:0);
 				ERROR3IF(pChild->R != R, "Bad child R");
 				ERROR3IF(pChild->G != G, "Bad child G");
 				ERROR3IF(pChild->B != B, "Bad child B");
+#endif
 				OctreeElement *pLChild = pChild;
 				while (pLChild->pListPrev) pLChild=pLChild->pListPrev;
 				ERROR3IF(pLChild!=ListHead[d+1][pLChild->NumChildren],"Child not in a list");


Xara