add more motions

This commit is contained in:
Dominik Demuth
2024-12-15 18:34:05 +01:00
parent adbf2af72b
commit bfb1cb314c
26 changed files with 243 additions and 71 deletions

View File

@@ -25,7 +25,7 @@ std::pair<std::string, double> get_optional_parameter(std::vector<std::string>::
stripped_arg = it->substr(1, it->size());
}
std::transform(stripped_arg.begin(), stripped_arg.end(), stripped_arg.begin(), [](unsigned char c) { return std::tolower(c); });
const auto stripped_value = std::stod(*(++it), nullptr);
const auto stripped_value = std::stod(*++it, nullptr);
return std::make_pair(stripped_arg, stripped_value);
}
@@ -95,7 +95,7 @@ Arguments parse_args(const int argc, char* argv[]) {
std::unordered_map<std::string, double> read_parameter(const std::filesystem::path& infile) {
if (!std::filesystem::exists(infile)) {
if (!exists(infile)) {
std::cerr << "File " << infile << " does not exist" << std::endl;
exit(1);
}