From 1cd91e1aaa4dfcf1f5245cb789d62d555c0f41a4 Mon Sep 17 00:00:00 2001 From: William JCM Date: Tue, 3 Aug 2021 20:39:40 +0200 Subject: [PATCH] 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. :facepalm: --- src/ResearchTree/ResearchTree.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ResearchTree/ResearchTree.cpp b/src/ResearchTree/ResearchTree.cpp index d5b2f64..bda6279 100644 --- a/src/ResearchTree/ResearchTree.cpp +++ b/src/ResearchTree/ResearchTree.cpp @@ -384,7 +384,7 @@ void ResearchTree::readEngineUnlocks(Containers::ArrayView 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 engines, Contain return; } - for(Int& gear : gears) { + for(Int gear : gears) { if(_engineNodes.find(gear) != _engineNodes.end()) { _engineNodes.at(gear).setState(Node::State::Unlocked); }