fixing regression in osrm-components

This commit is contained in:
Dennis Luxen
2013-08-19 13:42:34 +02:00
parent b584ba9149
commit da98900e3a
3 changed files with 55 additions and 28 deletions
+13 -3
View File
@@ -111,7 +111,10 @@ void ExtractionContainers::PrepareData(const std::string & output_file_name, con
restrictionsIT->restriction.toNode = wayStartAndEndEdgeIT->firstStart;
}
if(UINT_MAX != restrictionsIT->restriction.fromNode && UINT_MAX != restrictionsIT->restriction.toNode) {
if(
UINT_MAX != restrictionsIT->restriction.fromNode &&
UINT_MAX != restrictionsIT->restriction.toNode
) {
++usableRestrictionsCounter;
}
++restrictionsIT;
@@ -123,8 +126,15 @@ void ExtractionContainers::PrepareData(const std::string & output_file_name, con
restrictionsOutstream.open(restrictionsFileName.c_str(), std::ios::binary);
restrictionsOutstream.write((char*)&uuid, sizeof(UUID));
restrictionsOutstream.write((char*)&usableRestrictionsCounter, sizeof(unsigned));
for(restrictionsIT = restrictionsVector.begin(); restrictionsIT != restrictionsVector.end(); ++restrictionsIT) {
if(UINT_MAX != restrictionsIT->restriction.fromNode && UINT_MAX != restrictionsIT->restriction.toNode) {
for(
restrictionsIT = restrictionsVector.begin();
restrictionsIT != restrictionsVector.end();
++restrictionsIT
) {
if(
UINT_MAX != restrictionsIT->restriction.fromNode &&
UINT_MAX != restrictionsIT->restriction.toNode
) {
restrictionsOutstream.write((char *)&(restrictionsIT->restriction), sizeof(TurnRestriction));
}
}