fix inverted logic
This commit is contained in:
parent
5d6b05979d
commit
1b257f7547
@ -162,24 +162,32 @@ int main (int argc, char *argv[]) {
|
||||
file_has_pbf_format = true;
|
||||
}
|
||||
}
|
||||
if(pos==std::string::npos) {
|
||||
if (pos==std::string::npos)
|
||||
{
|
||||
pos = output_file_name.find(".pbf");
|
||||
if(pos!=std::string::npos) {
|
||||
if (pos!=std::string::npos)
|
||||
{
|
||||
file_has_pbf_format = true;
|
||||
}
|
||||
}
|
||||
if(pos!=std::string::npos) {
|
||||
output_file_name.replace(pos, 8, ".osrm");
|
||||
restrictionsFileName.replace(pos, 8, ".osrm.restrictions");
|
||||
} else {
|
||||
pos=output_file_name.find(".osm");
|
||||
if(pos!=std::string::npos) {
|
||||
output_file_name.replace(pos, 5, ".osrm");
|
||||
restrictionsFileName.replace(pos, 5, ".osrm.restrictions");
|
||||
} else {
|
||||
if (pos == std::string::npos)
|
||||
{
|
||||
pos = output_file_name.find(".osm");
|
||||
if (pos == std::string::npos)
|
||||
{
|
||||
output_file_name.append(".osrm");
|
||||
restrictionsFileName.append(".osrm.restrictions");
|
||||
}
|
||||
else
|
||||
{
|
||||
output_file_name.replace(pos, 5, ".osrm");
|
||||
restrictionsFileName.replace(pos, 5, ".osrm.restrictions");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
output_file_name.replace(pos, 8, ".osrm");
|
||||
restrictionsFileName.replace(pos, 8, ".osrm.restrictions");
|
||||
}
|
||||
|
||||
boost::unordered_map<std::string, NodeID> stringMap;
|
||||
|
Loading…
Reference in New Issue
Block a user