Commit 3254681a authored by Ben Boeckel's avatar Ben Boeckel Committed by Ben Boeckel
Browse files

SystemTools: Reserve memory in JoinPath

Change-Id: I50bab3aa8ea1d95dce5220d92aaad90916bf33da
parent e9204f8f
......@@ -3563,6 +3563,13 @@ SystemTools
{
// Construct result in a single string.
kwsys_stl::string result;
size_t len = 0;
kwsys_stl::vector<kwsys_stl::string>::const_iterator i;
for(i = first; i != last; ++i)
{
len += 1 + i->size();
}
result.reserve(len);
// The first two components do not add a slash.
if(first != last)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment