Skip to content
Snippets Groups Projects
Commit d818e432 authored by Valerio Pastore's avatar Valerio Pastore
Browse files

small fix

parent d4107c79
No related branches found
No related tags found
No related merge requests found
......@@ -31,11 +31,11 @@ void YamlConfigurator::load(std::string path) {
}
/**
* Aggiorna il file di configurazione YAML inserendo nuove voci di configurazione per la chiave target.
* Rimuove anche le vecchie configurazioni corrispondenti alla chiave target.
*
* @param target La chiave di destinazione per la quale aggiungere e rimuovere le voci di configurazione.
*/
Updates the YAML configuration file by adding new configuration entries for the target key.
It also removes old configurations corresponding to the target key.
@param target The target key for which to add and remove configuration entries.
*/
int YamlConfigurator::pushConfigToSource(std::string target) {
boost::to_lower(target);
// Extracrs only target entries
......@@ -109,9 +109,8 @@ int YamlConfigurator::pushConfigToSource(std::string target) {
}
int YamlConfigurator::pushConfigToSource() {
// estraggo tutti i target e li inserisco nel vector
// extract targets
std::vector<std::string> tagets;
for (const auto &pair : config) {
std::string key = pair.first;
size_t pos = key.find('_');
......@@ -124,7 +123,7 @@ int YamlConfigurator::pushConfigToSource() {
}
}
}
// chiamo la funzione per ogni target.
// call push for each target
for (auto target : tagets)
pushConfigToSource(target);
return 1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment