mirror of
https://github.com/NixOS/nix
synced 2025-07-06 00:51:47 +02:00
Merge pull request #11847 from xokdvium/dev/some-vector-reserves
refactor(treewide): reserve vector capacity when final size is known
This commit is contained in:
commit
cdcf9bd2fa
6 changed files with 6 additions and 0 deletions
|
@ -56,6 +56,7 @@ ExecutablePath ExecutablePath::parse(const OsString & path)
|
|||
OsString ExecutablePath::render() const
|
||||
{
|
||||
std::vector<PathViewNG> path2;
|
||||
path2.reserve(directories.size());
|
||||
for (auto & p : directories)
|
||||
path2.push_back(p.native());
|
||||
return basicConcatStringsSep(path_var_separator, path2);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue