Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
K
KWSys
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martin Willers
KWSys
Commits
3254681a
Commit
3254681a
authored
11 years ago
by
Ben Boeckel
Committed by
Ben Boeckel
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
SystemTools: Reserve memory in JoinPath
Change-Id: I50bab3aa8ea1d95dce5220d92aaad90916bf33da
parent
e9204f8f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
SystemTools.cxx
+7
-0
7 additions, 0 deletions
SystemTools.cxx
with
7 additions
and
0 deletions
SystemTools.cxx
+
7
−
0
View file @
3254681a
...
@@ -3563,6 +3563,13 @@ SystemTools
...
@@ -3563,6 +3563,13 @@ SystemTools
{
{
// Construct result in a single string.
// Construct result in a single string.
kwsys_stl
::
string
result
;
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.
// The first two components do not add a slash.
if
(
first
!=
last
)
if
(
first
!=
last
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment