nix-env: A small std::move() optimization

Avoids doing a O(n) copy of Strings i.e. std::list<std::string>
This commit is contained in:
Sidharth Kshatriya 2022-06-09 19:56:36 +05:30
parent 1bc17ae617
commit 7868405d58

View file

@ -1485,7 +1485,7 @@ static int main_nix_env(int argc, char * * argv)
if (globals.profile == "") if (globals.profile == "")
globals.profile = getDefaultProfile(); globals.profile = getDefaultProfile();
op(globals, opFlags, opArgs); op(globals, std::move(opFlags), std::move(opArgs));
globals.state->printStats(); globals.state->printStats();