Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Mathieu Westphal
KWSys
Commits
3254681a
Commit
3254681a
authored
Mar 11, 2014
by
Ben Boeckel
Committed by
Ben Boeckel
May 07, 2014
Browse files
SystemTools: Reserve memory in JoinPath
Change-Id: I50bab3aa8ea1d95dce5220d92aaad90916bf33da
parent
e9204f8f
Changes
1
Hide whitespace changes
Inline
Side-by-side
SystemTools.cxx
View file @
3254681a
...
...
@@ -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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment