if <accessclass>=no then immediately return. Fixes ticket 41

This commit is contained in:
DennisOSRM 2011-12-05 18:28:00 +01:00
parent afe9157d65
commit abfb49818f

View File

@ -103,7 +103,7 @@ public:
std::string route( w.keyVals.Find("route") ); std::string route( w.keyVals.Find("route") );
double maxspeed( atoi(w.keyVals.Find("maxspeed").c_str()) ); double maxspeed( atoi(w.keyVals.Find("maxspeed").c_str()) );
std::string access( w.keyVals.Find("access") ); std::string access( w.keyVals.Find("access") );
std::string accessClass( w.keyVals.Find(settings.accessTag) ); std::string accessTag( w.keyVals.Find(settings.accessTag) );
std::string man_made( w.keyVals.Find("man_made") ); std::string man_made( w.keyVals.Find("man_made") );
std::string barrier( w.keyVals.Find("barrier") ); std::string barrier( w.keyVals.Find("barrier") );
@ -135,10 +135,11 @@ public:
} }
} }
if("yes" == accessClass || "designated" == accessClass) if("yes" == accessTag || "designated" == accessTag)
w.access = true; w.access = true;
else if("no" == accessClass) else if("no" == accessTag) {
w.access = false; return true;
}
//Let's process oneway property, if speed profile obeys to it //Let's process oneway property, if speed profile obeys to it
if(oneway != "no" && oneway != "false" && oneway != "0" && settings.obeyOneways) { if(oneway != "no" && oneway != "false" && oneway != "0" && settings.obeyOneways) {