From 7868405d58f39877a267a3f243775dd0fe92e22d Mon Sep 17 00:00:00 2001 From: Sidharth Kshatriya Date: Thu, 9 Jun 2022 19:56:36 +0530 Subject: [PATCH] nix-env: A small std::move() optimization Avoids doing a O(n) copy of Strings i.e. std::list --- src/nix-env/nix-env.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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();