ResearchTree: use normal ints in range-based for.

They're smaller than references, and they're trivially-copiable. They
shouldn't be passed by reference. 🤦
This commit is contained in:
Guillaume Jacquemin 2021-08-03 20:39:40 +02:00
parent be4d1029c5
commit 1cd91e1aaa

View file

@ -384,7 +384,7 @@ void ResearchTree::readEngineUnlocks(Containers::ArrayView<Int> engines, Contain
return;
}
for(Int& engine : engines) {
for(Int engine : engines) {
if(_engineNodes.find(engine) != _engineNodes.end()) {
_engineNodes.at(engine).setState(Node::State::Unlocked);
}
@ -394,7 +394,7 @@ void ResearchTree::readEngineUnlocks(Containers::ArrayView<Int> engines, Contain
return;
}
for(Int& gear : gears) {
for(Int gear : gears) {
if(_engineNodes.find(gear) != _engineNodes.end()) {
_engineNodes.at(gear).setState(Node::State::Unlocked);
}