about summary refs log tree commit diff
path: root/src/libexpr
diff options
context:
space:
mode:
authorTuomas Tynkkynen <tuomas@tuxera.com>2018-02-16T03·13+0200
committerTuomas Tynkkynen <tuomas@tuxera.com>2018-02-17T14·54+0200
commit37264ed0ad898cdd6880de8ce6e5dda7977eed5f (patch)
tree9050b8950967a0ff44b9e9c7ce2319ecde7c91e8 /src/libexpr
parent66eeff33456d544e5852e580d8cac21f0c38c11f (diff)
libexpr: Avoid an unnecessary string copy in prim_derivationStrict
Diffstat (limited to 'src/libexpr')
-rw-r--r--src/libexpr/primops.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index f6c34d525768..a800d24290ae 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -553,7 +553,7 @@ static void prim_derivationStrict(EvalState & state, const Pos & pos, Value * *
 
     for (auto & i : args[0]->attrs->lexicographicOrder()) {
         if (i->name == state.sIgnoreNulls) continue;
-        string key = i->name;
+        const string & key = i->name;
         vomit("processing attribute '%1%'", key);
 
         auto handleHashMode = [&](const std::string & s) {