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

[XaraXtreme-commits] Commit Complete



Commit by  : alex
Repository : xara
Revision   : 1402
Date       : Tue Jul  4 10:26:41 BST 2006

Changed paths:
   M /Trunk/XaraLX/Kernel/ccfile.cpp
   M /Trunk/XaraLX/Kernel/colcontx.cpp
   M /Trunk/XaraLX/wxOil/colourmat.cpp
   M /Trunk/XaraLX/wxOil/grndrgn.cpp
   M /Trunk/XaraLX/wxOil/oilruler.cpp

Warnings clearups from Ben Fowler (with a couple of mods).


Diff:
Index: Trunk/XaraLX/Kernel/ccfile.cpp
===================================================================
--- Trunk/XaraLX/Kernel/ccfile.cpp	(revision 1401)
+++ Trunk/XaraLX/Kernel/ccfile.cpp	(revision 1402)
@@ -134,6 +134,7 @@
 // Declare smart memory handling in Debug builds
 #define new CAM_DEBUG_NEW
 
+#define CHAR_EOF ((char)EOF)
 
 /********************************************************************************************
 
@@ -2854,7 +2855,7 @@
 		if (RetValue == 0)
 		{
 			// found end of file so make sure we return an EOF as the data
-			Ch = EOF;
+			Ch = CHAR_EOF;
 		}
 
 		if (IOFile->fail())
@@ -2869,7 +2870,7 @@
 	}
 	
 	// check if found the EOF
-	if (Ch == EOF)
+	if (Ch == CHAR_EOF)
 	{
 		// Mark the EOF has having been reached.
 		IOFile->clear(ios::eofbit);
@@ -2888,7 +2889,7 @@
 	{
 		// Must leave 1 character space in the buffer if we reach the maximum buffer size
 		// so that we can fit the terminating zero in below.
-		while ((Max>1) && (Ch!=CR) && (Ch!=LF) && (Ch!=EOF))
+		while ((Max>1) && (Ch!=CR) && (Ch!=LF) && (Ch!=CHAR_EOF))
 		{
 			// store the char we read
 			Text[Off++] = Ch;
@@ -2920,7 +2921,7 @@
 		if (RetValue == 0)
 		{
 			// found end of file so make sure we return an EOF as the data
-			Ch = EOF;
+			Ch = CHAR_EOF;
 		}
 
 		if (IOFile->fail())
@@ -2936,7 +2937,7 @@
 		}
 		
 		// See if we have reached the end of the file
-		if (Ch==EOF)
+		if (Ch==CHAR_EOF)
 		{
 			// Mark the End Of File
 			IOFile->clear(ios::eofbit);
@@ -2967,7 +2968,7 @@
 		}
 
 		// See if we have reached the end of the file
-		if (Ch==EOF)
+		if (Ch==CHAR_EOF)
 		{
 			// Mark the End Of File
 			IOFile->clear(ios::eofbit);
@@ -3018,7 +3019,7 @@
 			if (RetValue == 0)
 			{
 				// found end of file so make sure we return an EOF as the data
-				Ch = EOF;
+				Ch = CHAR_EOF;
 			}
 
 			if (IOFile->fail())
@@ -3509,7 +3510,7 @@
 			if (RetValue == 0)
 			{
 				// end of file reached so return the EOF character
-				buf = EOF;
+				buf = CHAR_EOF;
 			}
 			else
 				buf = outbuf;
Index: Trunk/XaraLX/Kernel/colcontx.cpp
===================================================================
--- Trunk/XaraLX/Kernel/colcontx.cpp	(revision 1401)
+++ Trunk/XaraLX/Kernel/colcontx.cpp	(revision 1402)
@@ -152,10 +152,10 @@
 
 ColourContextArray ColourContext::GlobalDefaultContext = 
 {
+	{ NULL, NULL, NULL, NULL,
 	NULL, NULL, NULL, NULL,
 	NULL, NULL, NULL, NULL,
-	NULL, NULL, NULL, NULL,
-	NULL, NULL, NULL, NULL
+	NULL, NULL, NULL, NULL }
 };
 
 
Index: Trunk/XaraLX/wxOil/colourmat.cpp
===================================================================
--- Trunk/XaraLX/wxOil/colourmat.cpp	(revision 1401)
+++ Trunk/XaraLX/wxOil/colourmat.cpp	(revision 1402)
@@ -163,11 +163,11 @@
 	{
 		double cc = (1.0-d)/2.0; // Add constant boost to centre colour change
 		elements_t e = {
-			d,   0.0, 0.0, 0.0, 0.0,
+			{ d,   0.0, 0.0, 0.0, 0.0,
 			0.0, d,   0.0, 0.0, 0.0,
 			0.0, 0.0, d,   0.0, 0.0,
 			0.0, 0.0, 0.0, 1.0, 0.0,
-			cc,  cc,  cc,  0.0, 1.0
+			cc,  cc,  cc,  0.0, 1.0 }
 			};
 		r.elements = e;
 	}
@@ -194,11 +194,11 @@
 {
 	ColourMatrix r;
 	elements_t e = {
+		{ 0.0, 0.0, 0.0, 0.0, 0.0,
 		0.0, 0.0, 0.0, 0.0, 0.0,
 		0.0, 0.0, 0.0, 0.0, 0.0,
-		0.0, 0.0, 0.0, 0.0, 0.0,
 		0.0, 0.0, 0.0, 1.0, 0.0,
-		1.0, 1.0, 1.0, 0.0, 1.0
+		1.0, 1.0, 1.0, 0.0, 1.0 }
 		};
 	r.elements=e;
 	return r;
@@ -224,11 +224,11 @@
 {
 	ColourMatrix r;
 	elements_t e = {
+		{ 0.1, 0.1, 0.1, 0.0, 0.0,
 		0.1, 0.1, 0.1, 0.0, 0.0,
 		0.1, 0.1, 0.1, 0.0, 0.0,
-		0.1, 0.1, 0.1, 0.0, 0.0,
 		0.0, 0.0, 0.0, 1.0, 0.0,
-		0.6, 0.6, 0.6, 0.0, 1.0
+		0.6, 0.6, 0.6, 0.0, 1.0 }
 		};
 	r.elements=e;
 	return r;
Index: Trunk/XaraLX/wxOil/oilruler.cpp
===================================================================
--- Trunk/XaraLX/wxOil/oilruler.cpp	(revision 1401)
+++ Trunk/XaraLX/wxOil/oilruler.cpp	(revision 1402)
@@ -2069,7 +2069,7 @@
                     
 void OriginGadget::OnLButtonDblClk(wxMouseEvent& event)
 {
-	UINT32 nFlags = ClickModifiers::SynthesizeMouseEventFlags(event);
+	/*UINT32 nFlags =*/ ClickModifiers::SynthesizeMouseEventFlags(event);
 	wxPoint point = event.GetPosition();
 
 	if (OpResetSpreadOrigin::GetState(NULL,NULL).Greyed==FALSE)
Index: Trunk/XaraLX/wxOil/grndrgn.cpp
===================================================================
--- Trunk/XaraLX/wxOil/grndrgn.cpp	(revision 1401)
+++ Trunk/XaraLX/wxOil/grndrgn.cpp	(revision 1402)
@@ -6835,7 +6835,7 @@
 	CapStyles CapS = (LineCaps==LineCapButt) ? CAPS_BUTT : (LineCaps==LineCapRound) ? CAPS_ROUND : CAPS_SQUARE;
 	JoinStyles JoinS = (LineJoin==MitreJoin) ? JOIN_MITER :	(LineJoin==RoundJoin) ? JOIN_ROUND : JOIN_BEVEL;
 
-	DASH GDash = { 0, 0, 0 };
+	DASH GDash = { 0, 0, { 0 } };
 
 	if(Dash)
 		memcpy(&GDash,Dash,sizeof(GDash));


Xara