Avoid copies in loop iterator
This commit is contained in:
@@ -758,7 +758,7 @@ namespace Config {
|
||||
std::ofstream cwrite(conf_file, std::ios::trunc);
|
||||
if (cwrite.good()) {
|
||||
cwrite << "#? Config file for btop v. " << Global::Version << "\n";
|
||||
for (auto [name, description] : descriptions) {
|
||||
for (const auto& [name, description] : descriptions) {
|
||||
cwrite << "\n" << (description.empty() ? "" : description + "\n")
|
||||
<< name << " = ";
|
||||
if (strings.contains(name))
|
||||
|
||||
Reference in New Issue
Block a user