diff options
author | eldritch horrors <pennae@lix.systems> | 2024-06-16 23:10:09 +0200 |
---|---|---|
committer | eldritch horrors <pennae@lix.systems> | 2024-06-17 19:46:44 +0000 |
commit | b8f49a8eaf619df6d228f2e0f9814c4a5fa4aec5 (patch) | |
tree | 311d001ae953e0f8d750ec59a124c0a737b083f0 /src/libexpr/nixexpr.cc | |
parent | dad8bc679e9f7bd97442249293138c7a2af311e4 (diff) |
libexpr: store ExprConcatStrings elements as direct vector
storing a pointer only adds an unnecessary indirection at runtime.
Change-Id: If06dd05effdf1ccb0df0873580f50c775608925d
Diffstat (limited to 'src/libexpr/nixexpr.cc')
-rw-r--r-- | src/libexpr/nixexpr.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libexpr/nixexpr.cc b/src/libexpr/nixexpr.cc index 664872882..03e1effc0 100644 --- a/src/libexpr/nixexpr.cc +++ b/src/libexpr/nixexpr.cc @@ -231,7 +231,7 @@ void ExprConcatStrings::show(const SymbolTable & symbols, std::ostream & str) co { bool first = true; str << "("; - for (auto & i : *es) { + for (auto & i : es) { if (first) first = false; else str << " + "; i.second->show(symbols, str); } @@ -547,7 +547,7 @@ void ExprConcatStrings::bindVars(EvalState & es, const std::shared_ptr<const Sta if (es.debugRepl) es.exprEnvs.insert(std::make_pair(this, env)); - for (auto & i : *this->es) + for (auto & i : this->es) i.second->bindVars(es, env); } |