fixing a silly endless loop that occurred when an edge had a starting node that was not present in node data (Thanks Frederik)
This commit is contained in:
parent
878e837679
commit
ac6583906d
@ -250,7 +250,8 @@ int main (int argc, char *argv[]) {
|
|||||||
nodesIT++;
|
nodesIT++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if(edgeIT->startCoord.lat != INT_MIN && edgeIT->target == nodesIT->id) {
|
if(edgeIT->target == nodesIT->id) {
|
||||||
|
if(edgeIT->startCoord.lat != INT_MIN) {
|
||||||
edgeIT->targetCoord.lat = nodesIT->lat;
|
edgeIT->targetCoord.lat = nodesIT->lat;
|
||||||
edgeIT->targetCoord.lon = nodesIT->lon;
|
edgeIT->targetCoord.lon = nodesIT->lon;
|
||||||
|
|
||||||
@ -291,7 +292,7 @@ int main (int argc, char *argv[]) {
|
|||||||
short edgeType = edgeIT->type;
|
short edgeType = edgeIT->type;
|
||||||
fout.write((char*)&edgeType, sizeof(short));
|
fout.write((char*)&edgeType, sizeof(short));
|
||||||
fout.write((char*)&edgeIT->nameID, sizeof(unsigned));
|
fout.write((char*)&edgeIT->nameID, sizeof(unsigned));
|
||||||
|
}
|
||||||
usedEdgeCounter++;
|
usedEdgeCounter++;
|
||||||
edgeIT++;
|
edgeIT++;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user