Author: mordante
Date: Thu Apr 2 20:22:27 2009
New Revision: 34398
URL: http://svn.gna.org/viewcvs/wesnoth?rev=34398&view=rev
Log:
Converted the old style casts to c++ style casts.
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=34398&r1=34397&r2=34398&view=diff
==============================================================================
--- trunk/src/mouse_handler_base.cpp (original)
+++ trunk/src/mouse_handler_base.cpp Thu Apr 2 20:22:27 2009
@@ -107,7 +107,8 @@
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)) {
- const double drag_distance = std::pow((double)
(drag_from_x_- mx), 2) + std::pow((double) (drag_from_y_- my), 2);
+ const double drag_distance =
std::pow(static_cast<double>(drag_from_x_- mx), 2)
+ +
std::pow(static_cast<double>(drag_from_y_- my), 2);
if (drag_distance > drag_threshold()*drag_threshold()) {
dragging_started_ = true;
cursor::set_dragging(true);
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits