Skip to content

Commit 16d0df0

Browse files
committed
Optimized variable handling
1 parent 7c4dcdf commit 16d0df0

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/anchored_set_variable.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,7 @@ std::unique_ptr<std::string> AnchoredSetVariable::resolveFirst(
111111
const std::string &key) {
112112

113113
if (auto search = this->find(key); search != this->end()) {
114-
auto b = std::make_unique<std::string>();
115-
b->assign(search->second->getValue());
116-
return b;
114+
return std::make_unique<std::string>(search->second->getValue());
117115
}
118116

119117
return nullptr;

0 commit comments

Comments
 (0)