Author: mordante
Date: Thu May 21 18:38:08 2009
New Revision: 35794

URL: http://svn.gna.org/viewcvs/wesnoth?rev=35794&view=rev
Log:
Converted the old style casts to c++ style casts.

Modified:
    trunk/src/astarsearch.cpp

Modified: trunk/src/astarsearch.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/astarsearch.cpp?rev=35794&r1=35793&r2=35794&view=diff
==============================================================================
--- trunk/src/astarsearch.cpp (original)
+++ trunk/src/astarsearch.cpp Thu May 21 18:38:08 2009
@@ -189,7 +189,7 @@
        plain_route route;
        if (nodes[index(dst)].g < stop_at) {
                DBG_PF << "found solution; calculating it...\n";
-               route.move_cost = (int)nodes[index(dst)].g;
+               route.move_cost = static_cast<int>(nodes[index(dst)].g);
                for (node curr = nodes[index(dst)]; curr.prev != 
map_location::null_location; curr = nodes[index(curr.prev)]) {
                        route.steps.push_back(curr.curr);
                }
@@ -197,7 +197,7 @@
                std::reverse(route.steps.begin(), route.steps.end());
        } else {
                LOG_PF << "aborted a* search  " << "\n";
-               route.move_cost = (int)calc->getNoPathValue();
+               route.move_cost = static_cast<int>(calc->getNoPathValue());
        }
 
        return route;


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

Reply via email to