Skip to content

Commit 772390c

Browse files
Use reference over copying
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 0de6268 commit 772390c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/eval.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,8 @@ bool operator==(const CuraFormulaeEngine::eval::Value& lhs, const CuraFormulaeEn
328328
if (std::holds_alternative<std::unordered_map<std::string, CuraFormulaeEngine::eval::Value>>(lhs.value) &&
329329
std::holds_alternative<std::unordered_map<std::string, CuraFormulaeEngine::eval::Value>>(rhs.value))
330330
{
331-
auto map_lhs = std::get<std::unordered_map<std::string, CuraFormulaeEngine::eval::Value>>(lhs.value);
332-
auto map_rhs = std::get<std::unordered_map<std::string, CuraFormulaeEngine::eval::Value>>(rhs.value);
331+
const auto& map_lhs = std::get<std::unordered_map<std::string, CuraFormulaeEngine::eval::Value>>(lhs.value);
332+
const auto& map_rhs = std::get<std::unordered_map<std::string, CuraFormulaeEngine::eval::Value>>(rhs.value);
333333

334334
if (map_lhs.size() != map_rhs.size())
335335
{

0 commit comments

Comments
 (0)