Loading src/core/config/ConfigManager.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ ConfigManager::ConfigManager(std::filesystem::path file_name, LOG(TRACE) << "Reading main configuration"; // Read the file ConfigReader reader(file, file_name); ConfigReader reader(file, std::move(file_name)); // Convert all global and ignored names to lower case and store them auto lowercase = [](const std::string& in) { return allpix::transform(in, ::tolower); }; Loading src/core/config/ConfigReader.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -156,7 +156,7 @@ void ConfigReader::add(std::istream& stream, std::filesystem::path file_name) { // Line should be a key / value pair with an equal sign try { // Parse the key value pair auto [key, value] = parseKeyValue(line); auto [key, value] = parseKeyValue(std::move(line)); // Add the config key conf.setText(key, value); Loading src/core/config/Configuration.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -284,7 +284,7 @@ std::unique_ptr<Configuration::parse_node> Configuration::parse_value(std::strin node->value = str.substr(beg, end - beg); } else { // Not an array, handle as value instead node->value = str; node->value = std::move(str); } // Handle zero level where brackets where explicitly added Loading src/core/config/Configuration.tpp +3 −3 Original line number Diff line number Diff line Loading @@ -54,7 +54,7 @@ namespace allpix { used_keys_.markUsed(key); std::vector<T> array; auto node = parse_value(str); auto node = parse_value(std::move(str)); for(auto& child : node->children) { try { array.push_back(allpix::from_string<T>(child->value)); Loading Loading @@ -93,7 +93,7 @@ namespace allpix { used_keys_.markUsed(key); Matrix<T> matrix; auto node = parse_value(str); auto node = parse_value(std::move(str)); for(auto& child : node->children) { if(child->children.empty()) { throw std::invalid_argument("matrix has less than two dimensions, enclosing brackets might be missing"); Loading Loading @@ -161,7 +161,7 @@ namespace allpix { str += ","; } str.pop_back(); config_[key] = str; config_[key] = std::move(str); used_keys_.registerMarker(key); if(mark_used) { used_keys_.markUsed(key); Loading src/core/config/OptionParser.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ using namespace allpix; */ void OptionParser::parseOption(std::string line) { line = allpix::trim(line); auto [key, value] = ConfigReader::parseKeyValue(line); auto [key, value] = ConfigReader::parseKeyValue(std::move(line)); auto dot_pos = key.find('.'); if(dot_pos == std::string::npos) { Loading Loading
src/core/config/ConfigManager.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ ConfigManager::ConfigManager(std::filesystem::path file_name, LOG(TRACE) << "Reading main configuration"; // Read the file ConfigReader reader(file, file_name); ConfigReader reader(file, std::move(file_name)); // Convert all global and ignored names to lower case and store them auto lowercase = [](const std::string& in) { return allpix::transform(in, ::tolower); }; Loading
src/core/config/ConfigReader.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -156,7 +156,7 @@ void ConfigReader::add(std::istream& stream, std::filesystem::path file_name) { // Line should be a key / value pair with an equal sign try { // Parse the key value pair auto [key, value] = parseKeyValue(line); auto [key, value] = parseKeyValue(std::move(line)); // Add the config key conf.setText(key, value); Loading
src/core/config/Configuration.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -284,7 +284,7 @@ std::unique_ptr<Configuration::parse_node> Configuration::parse_value(std::strin node->value = str.substr(beg, end - beg); } else { // Not an array, handle as value instead node->value = str; node->value = std::move(str); } // Handle zero level where brackets where explicitly added Loading
src/core/config/Configuration.tpp +3 −3 Original line number Diff line number Diff line Loading @@ -54,7 +54,7 @@ namespace allpix { used_keys_.markUsed(key); std::vector<T> array; auto node = parse_value(str); auto node = parse_value(std::move(str)); for(auto& child : node->children) { try { array.push_back(allpix::from_string<T>(child->value)); Loading Loading @@ -93,7 +93,7 @@ namespace allpix { used_keys_.markUsed(key); Matrix<T> matrix; auto node = parse_value(str); auto node = parse_value(std::move(str)); for(auto& child : node->children) { if(child->children.empty()) { throw std::invalid_argument("matrix has less than two dimensions, enclosing brackets might be missing"); Loading Loading @@ -161,7 +161,7 @@ namespace allpix { str += ","; } str.pop_back(); config_[key] = str; config_[key] = std::move(str); used_keys_.registerMarker(key); if(mark_used) { used_keys_.markUsed(key); Loading
src/core/config/OptionParser.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ using namespace allpix; */ void OptionParser::parseOption(std::string line) { line = allpix::trim(line); auto [key, value] = ConfigReader::parseKeyValue(line); auto [key, value] = ConfigReader::parseKeyValue(std::move(line)); auto dot_pos = key.find('.'); if(dot_pos == std::string::npos) { Loading