add some specific casts to avoid MSVC warnery

This commit is contained in:
Dennis Luxen 2014-10-28 10:13:26 -04:00
parent d2bd238274
commit 0f5dffb1c3
2 changed files with 2 additions and 2 deletions

View File

@ -123,7 +123,7 @@ EdgeBasedGraphFactory::InsertEdgeBasedNode(const NodeID node_u, const NodeID nod
m_geometry_compressor.GetBucketReference(e2);
BOOST_ASSERT(forward_geometry.size() == reverse_geometry.size());
BOOST_ASSERT(0 != forward_geometry.size());
const unsigned geometry_size = forward_geometry.size();
const unsigned geometry_size = static_cast<unsigned>(forward_geometry.size());
BOOST_ASSERT(geometry_size > 1);
// reconstruct bidirectional edge with individual weights and put each into the NN index

View File

@ -100,7 +100,7 @@ template <typename EdgeDataT> class DynamicGraph
position += node_list[node].edges;
}
node_list.back().firstEdge = position;
edge_list.reserve((std::size_t)edge_list.size() * 1.1);
edge_list.reserve(static_cast<std::size_t>(edge_list.size() * 1.1));
edge_list.resize(position);
edge = 0;
for (const auto node : osrm::irange(0u, number_of_nodes))