Routing generator warning fixes.

This commit is contained in:
Lev Dragunov 2015-09-24 15:25:22 +03:00
parent 0eb7a19745
commit 684dc00e70
2 changed files with 4 additions and 4 deletions

View file

@ -84,11 +84,11 @@ inline bool SaveNodeDataToFile(std::string const & filename, NodeDataVectorT con
if (!stream.is_open())
return false;
uint32_t count = data.size();
uint32_t count = static_cast<uint32_t>(data.size());
stream.write((char*)&count, sizeof(count));
for (auto d : data)
{
uint32_t pc = d.m_segments.size();
uint32_t pc = static_cast<uint32_t>(d.m_segments.size());
stream.write((char*)&pc, sizeof(pc));
stream.write((char*)d.m_segments.data(), sizeof(NodeData::SegmentInfo) * pc);
}

View file

@ -91,7 +91,7 @@ void FindCrossNodes(osrm::NodeDataVectorT const & nodeData, gen::OsmID2FeatureID
});
});
for (size_t nodeId = 0; nodeId < nodeData.size(); ++nodeId)
for (WritedNodeID nodeId = 0; nodeId < nodeData.size(); ++nodeId)
{
auto const & data = nodeData[nodeId];
@ -250,7 +250,7 @@ void BuildRoutingIndex(string const & baseDir, string const & countryName, strin
uint32_t found = 0, all = 0, multiple = 0, equal = 0, moreThan1Seg = 0, stored = 0;
for (size_t nodeId = 0; nodeId < nodeData.size(); ++nodeId)
for (WritedNodeID nodeId = 0; nodeId < nodeData.size(); ++nodeId)
{
auto const & data = nodeData[nodeId];