small cleanup (#669)

This commit is contained in:
Edo 2023-04-03 13:22:13 +02:00 committed by GitHub
parent d16873d8f1
commit 184a82fd8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,20 +41,20 @@ namespace utils
{ {
const auto& key = key_values[i]; const auto& key = key_values[i];
const auto& value = key_values[i + 1]; const auto& value = key_values[i + 1];
this->key_value_pairs_[key] = value;
if (!this->key_value_pairs_.contains(key))
{
this->key_value_pairs_[key] = value;
}
} }
} }
std::string info_string::build() const std::string info_string::build() const
{ {
//auto first = true;
std::string info_string; std::string info_string;
for (const auto& [key, val] : this->key_value_pairs_) for (const auto& [key, val] : this->key_value_pairs_)
{ {
//if (first) first = false;
/*else*/
info_string.append("\\"); info_string.append("\\");
info_string.append(key); info_string.append(key);
info_string.append("\\"); info_string.append("\\");
info_string.append(val); info_string.append(val);