Author: brunowolff
Date: Wed Mar 19 18:48:22 2008
New Revision: 24869

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

Modified:
    trunk/src/tooltips.cpp

Modified: trunk/src/tooltips.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/tooltips.cpp?rev=24869&r1=24868&r2=24869&view=diff
==============================================================================
--- trunk/src/tooltips.cpp (original)
+++ trunk/src/tooltips.cpp Wed Mar 19 18:48:22 2008
@@ -24,11 +24,11 @@
 
 static bool rectangles_overlap(const SDL_Rect& a, const SDL_Rect& b)
 {
-       const bool xoverlap = a.x >= b.x && a.x < b.x + b.w ||
-                             b.x >= a.x && b.x < a.x + a.w;
+       const bool xoverlap = (a.x >= b.x && a.x < b.x + b.w) ||
+                             (b.x >= a.x && b.x < a.x + a.w);
 
-       const bool yoverlap = a.y >= b.y && a.y < b.y + b.h ||
-                             b.y >= a.y && b.y < a.y + a.h;
+       const bool yoverlap = (a.y >= b.y && a.y < b.y + b.h) ||
+                             (b.y >= a.y && b.y < a.y + a.h);
 
        return xoverlap && yoverlap;
 }


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to