Author: sapient
Date: Thu Apr 19 03:57:45 2007
New Revision: 16927
URL: http://svn.gna.org/viewcvs/wesnoth?rev=16927&view=rev
Log:
don't use int __cdecl ::abs() as direct parameter to maximum<int>()
Modified:
trunk/src/mouse_events.cpp
Modified: trunk/src/mouse_events.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/mouse_events.cpp?rev=16927&r1=16926&r2=16927&view=diff
==============================================================================
--- trunk/src/mouse_events.cpp (original)
+++ trunk/src/mouse_events.cpp Thu Apr 19 03:57:45 2007
@@ -744,7 +744,10 @@
int mx = drag_from_x_; // some default value to prevent unlikely SDL bug
int my = drag_from_y_;
if (dragging_ && !dragging_started_ && (SDL_GetMouseState(&mx,&my) &
SDL_BUTTON(1) != 0)) {
- const int drag_distance = maximum<int>(abs(drag_from_x_- mx),
abs(drag_from_y_- my));
+ const int abs1 = abs(drag_from_x_- mx);
+ const int abs2 = abs(drag_from_y_- my);
+ //don't use int __cdecl ::abs() as direct parameter to
maximum<int>()
+ const int drag_distance = maximum<int>(abs1, abs2);
if (drag_distance > 10) {
dragging_started_ = true;
cursor::set_dragging(true);
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits