diff options
author | Lev Dragunov <l.dragunov@corp.mail.ru> | 2015-06-12 23:48:22 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:51:00 +0300 |
commit | 366c9af196151345c4da0d9d5791105554c57e58 (patch) | |
tree | 6c88a54e5d359d7ed12eef8e1b0cfc42b446e187 /3party/osrm | |
parent | db11c26d243a5ca8339eb49b44df761c8aa8bf08 (diff) |
osrm-prepare command line parser fix
Diffstat (limited to '3party/osrm')
-rwxr-xr-x | 3party/osrm/osrm-backend/contractor/processing_chain.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/3party/osrm/osrm-backend/contractor/processing_chain.cpp b/3party/osrm/osrm-backend/contractor/processing_chain.cpp index d05de7a64d..cde246134e 100755 --- a/3party/osrm/osrm-backend/contractor/processing_chain.cpp +++ b/3party/osrm/osrm-backend/contractor/processing_chain.cpp @@ -343,10 +343,11 @@ bool Prepare::ParseArguments(int argc, char *argv[]) "Path to a configuration file."); // declare a group of options that will be allowed both on command line and in config file + std::string string_restrictions_path; boost::program_options::options_description config_options("Configuration"); config_options.add_options()( "restrictions,r", - boost::program_options::value<boost::filesystem::path>(&restrictions_path), + boost::program_options::value<std::string>(&string_restrictions_path), "Restrictions file in .osrm.restrictions format")( "profile,p", boost::program_options::value<boost::filesystem::path>(&profile_path) ->default_value("profile.lua"), @@ -408,6 +409,9 @@ bool Prepare::ParseArguments(int argc, char *argv[]) boost::program_options::notify(option_variables); + input_path = boost::filesystem::path(string_input_path); + restrictions_path = boost::filesystem::path(string_restrictions_path); + if (!option_variables.count("restrictions")) { restrictions_path = std::string(input_path.string() + ".restrictions"); @@ -419,7 +423,6 @@ bool Prepare::ParseArguments(int argc, char *argv[]) return false; } - input_path = boost::filesystem::path(string_input_path); return true; } |