diff options
author | Sidharth Kshatriya <sid.kshatriya@gmail.com> | 2022-06-09 19:56:36 +0530 |
---|---|---|
committer | Sidharth Kshatriya <sid.kshatriya@gmail.com> | 2022-06-09 20:01:01 +0530 |
commit | 7868405d58f39877a267a3f243775dd0fe92e22d (patch) | |
tree | 8059a297dee0b229acd9bcf70b429aac4faeefe1 /src | |
parent | 1bc17ae6174b6307d2e1968583b527379c4a7019 (diff) |
nix-env: A small std::move() optimization
Avoids doing a O(n) copy of Strings i.e. std::list<std::string>
Diffstat (limited to 'src')
-rw-r--r-- | src/nix-env/nix-env.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nix-env/nix-env.cc b/src/nix-env/nix-env.cc index c412bb814..a69d3700d 100644 --- a/src/nix-env/nix-env.cc +++ b/src/nix-env/nix-env.cc @@ -1485,7 +1485,7 @@ static int main_nix_env(int argc, char * * argv) if (globals.profile == "") globals.profile = getDefaultProfile(); - op(globals, opFlags, opArgs); + op(globals, std::move(opFlags), std::move(opArgs)); globals.state->printStats(); |