diff options
author | Tuomas Tynkkynen <tuomas@tuxera.com> | 2018-02-16T03·13+0200 |
---|---|---|
committer | Tuomas Tynkkynen <tuomas@tuxera.com> | 2018-02-17T14·54+0200 |
commit | 37264ed0ad898cdd6880de8ce6e5dda7977eed5f (patch) | |
tree | 9050b8950967a0ff44b9e9c7ce2319ecde7c91e8 | |
parent | 66eeff33456d544e5852e580d8cac21f0c38c11f (diff) |
libexpr: Avoid an unnecessary string copy in prim_derivationStrict
-rw-r--r-- | src/libexpr/primops.cc | 2 |
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) { |