From 16d0df0ff9598cedec29330944e09151dba8fea2 Mon Sep 17 00:00:00 2001 From: Ervin Hegedus Date: Sun, 31 Mar 2024 14:14:45 +0200 Subject: [PATCH] Optimized variable handling --- src/anchored_set_variable.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/anchored_set_variable.cc b/src/anchored_set_variable.cc index 2a1dd6c9..1931d6cd 100644 --- a/src/anchored_set_variable.cc +++ b/src/anchored_set_variable.cc @@ -111,9 +111,7 @@ std::unique_ptr AnchoredSetVariable::resolveFirst( const std::string &key) { if (auto search = this->find(key); search != this->end()) { - auto b = std::make_unique(); - b->assign(search->second->getValue()); - return b; + return std::make_unique(search->second->getValue()); } return nullptr;