Commit 60d0264f authored by kraus's avatar kraus

Merge branch '493-template-directory-not-found-when-path-contains-spaces' into 'master'

Resolve "Template directory not found when path contains spaces"

Closes #493

See merge request !310
parents c19e7144 3c12dbba
......@@ -153,7 +153,14 @@ private:
/// tries to retrieve command line parameter.
/// @throws OptPilotException if parameter was not found.
template<class T>
T arg(const std::string name) {
T arg(const std::string name);
};
typedef boost::shared_ptr<CmdArguments> CmdArguments_t;
template<class T>
inline T CmdArguments::arg(const std::string name) {
T t;
std::map<std::string, std::string>::iterator it = arguments_.find(name);
if(it != arguments_.end()) {
......@@ -163,9 +170,16 @@ private:
} else {
throw OptPilotException("CmdArguments::getArg", "argument not found!");
}
}
};
}
typedef boost::shared_ptr<CmdArguments> CmdArguments_t;
template<>
inline std::string CmdArguments::arg<std::string>(const std::string name) {
std::map<std::string, std::string>::iterator it = arguments_.find(name);
if(it != arguments_.end()) {
return arguments_[name];
} else {
throw OptPilotException("CmdArguments::getArg", "argument not found!");
}
}
#endif
\ No newline at end of file
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