use explicit casts where feasible

This commit is contained in:
Dennis Luxen 2014-06-17 15:51:43 +02:00
parent a58d8420a2
commit 58f23cda4a

View File

@ -91,7 +91,7 @@ template <class DataFacadeT> class DistanceTablePlugin : public BasePlugin
std::vector<PhantomNode> phantom_node_vector(raw_route.raw_via_node_coordinates.size()); std::vector<PhantomNode> phantom_node_vector(raw_route.raw_via_node_coordinates.size());
const bool checksum_OK = (route_parameters.check_sum == raw_route.check_sum); const bool checksum_OK = (route_parameters.check_sum == raw_route.check_sum);
unsigned max_locations = std::min((std::size_t)100, raw_route.raw_via_node_coordinates.size()); unsigned max_locations = std::min(100u, static_cast<unsigned>(raw_route.raw_via_node_coordinates.size()));
for (unsigned i = 0; i < max_locations; ++i) for (unsigned i = 0; i < max_locations; ++i)
{ {
if (checksum_OK && i < route_parameters.hints.size() && if (checksum_OK && i < route_parameters.hints.size() &&
@ -120,7 +120,7 @@ template <class DataFacadeT> class DistanceTablePlugin : public BasePlugin
} }
JSON::Object json_object; JSON::Object json_object;
JSON::Array json_array; JSON::Array json_array;
const unsigned number_of_locations = phantom_node_vector.size(); const unsigned number_of_locations = static_cast<unsigned>(phantom_node_vector.size());
for(unsigned row = 0; row < number_of_locations; ++row) for(unsigned row = 0; row < number_of_locations; ++row)
{ {
JSON::Array json_row; JSON::Array json_row;