Commit 6e3a5f53 authored by VAN TOLL Wouter's avatar VAN TOLL Wouter

Merge

parents 1e1c76a3 fc004d68
......@@ -57,8 +57,8 @@ void XMLParser::loadMasterConfig(const std::string &filename, CrowdSimulator * c
// Location of the config file should be relative to the location of the *main* config file.
// Check if the main config file lies in a subfolder.
auto endOfPath = filename.find_last_of('/');
std::string mainPath = (endOfPath < 0 ? "" : filename.substr(0, endOfPath));
load(mainPath + "/" + simConfigPathElt->Attribute("path"), crowdsimulator);
std::string mainPath = (endOfPath == std::string::npos ? "" : filename.substr(0, endOfPath));
load(mainPath + simConfigPathElt->Attribute("path"), crowdsimulator);
}
else
std::cerr << "Warning: No paths for configuration in the XML file" << std::endl;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment