mail[Wesnoth-commits] r28598 - /trunk/src/mouse_handler_base.cpp


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

Header


Content

Posted by kailoran on August 15, 2008 - 18:14:
Author: ilor
Date: Fri Aug 15 14:10:03 2008
New Revision: 28598

URL: http://svn.gna.org/viewcvs/wesnoth?rev=28598&view=rev
Log:
add parens to silence gcc 4.3.1

Modified:
    trunk/src/mouse_handler_base.cpp

Modified: trunk/src/mouse_handler_base.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/mouse_handler_base.cpp?rev=28598&r1=28597&r2=28598&view=diff
==============================================================================
--- trunk/src/mouse_handler_base.cpp (original)
+++ trunk/src/mouse_handler_base.cpp Fri Aug 15 14:10:03 2008
@@ -103,8 +103,8 @@
        int mx = drag_from_x_; // some default value to prevent unlikely SDL 
bug
        int my = drag_from_y_;
        if (is_dragging() && !dragging_started_) {
-               if (dragging_left_ && (SDL_GetMouseState(&mx,&my) & 
SDL_BUTTON_LEFT) != 0
-               || dragging_right_ && (SDL_GetMouseState(&mx,&my) & 
SDL_BUTTON_RIGHT) != 0) {
+               if ((dragging_left_ && (SDL_GetMouseState(&mx,&my) & 
SDL_BUTTON_LEFT) != 0)
+               || (dragging_right_ && (SDL_GetMouseState(&mx,&my) & 
SDL_BUTTON_RIGHT) != 0)) {
                        const double drag_distance = std::pow((double) 
(drag_from_x_- mx), 2) + std::pow((double) (drag_from_y_- my), 2);
                        if (drag_distance > drag_threshold_*drag_threshold_) {
                                dragging_started_ = true;




Related Messages


Powered by MHonArc, Updated Fri Aug 15 19:01:20 2008