mail[Wesnoth-commits] r24831 - /trunk/src/pathutils.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by bruno on March 19, 2008 - 17:06:
Author: brunowolff
Date: Wed Mar 19 17:00:06 2008
New Revision: 24831

URL: http://svn.gna.org/viewcvs/wesnoth?rev=24831&view=rev
Log:
Silence gcc 4.3 warnings by adding parens around && clauses near ||.

Modified:
    trunk/src/pathutils.cpp

Modified: trunk/src/pathutils.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/pathutils.cpp?rev=24831&r1=24830&r2=24831&view=diff
==============================================================================
--- trunk/src/pathutils.cpp (original)
+++ trunk/src/pathutils.cpp Wed Mar 19 17:00:06 2008
@@ -67,7 +67,7 @@
 
        const int xdiff = abs(a.x - b.x);
        const int ydiff = abs(a.y - b.y);
-       return ydiff == 1 && a.x == b.x || xdiff == 1 && a.y == b.y ||
-              xdiff == 1 && ydiff == 1 && (a.y > b.y ? is_even(a.x) : 
is_even(b.x));
+       return ydiff == (1 && a.x == b.x) || (xdiff == 1 && a.y == b.y) ||
+              (xdiff == 1 && ydiff == 1 && (a.y > b.y ? is_even(a.x) : 
is_even(b.x)));
 }
 




Related Messages


Powered by MHonArc, Updated Wed Mar 19 17:21:39 2008