Use non-reference type to explicitely show the copy

This appeases -Wrange-loop-bind-reference as in every other all_children_range use in a range-for loop.
This commit is contained in:
Gunter Labes 2024-08-18 16:08:05 +02:00
parent 4915f3be86
commit 55f6c69f68
No known key found for this signature in database
GPG key ID: C0C7B971CC910216

View file

@ -272,12 +272,12 @@ void prefs::load_preferences()
}
}
for(const auto& child : synced_prefs.all_children_range()) {
for(const auto child : synced_prefs.all_children_range()) {
if(std::find(synced_children_.begin(), synced_children_.end(), child.key) == synced_children_.end()) {
unknown_synced_children_.insert(child.key);
}
}
for(const auto& child : unsynced_prefs.all_children_range()) {
for(const auto child : unsynced_prefs.all_children_range()) {
if(std::find(unsynced_children_.begin(), unsynced_children_.end(), child.key) == unsynced_children_.end()) {
unknown_unsynced_children_.insert(child.key);
}