Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Dmitri Naumov
ogs
Commits
bcd3540a
Commit
bcd3540a
authored
4 years ago
by
Dmitri Naumov
Browse files
Options
Downloads
Patches
Plain Diff
[BL] ConfigTree; Constness and references.
parent
235d820e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
BaseLib/ConfigTreeUtil.cpp
+8
-8
8 additions, 8 deletions
BaseLib/ConfigTreeUtil.cpp
with
8 additions
and
8 deletions
BaseLib/ConfigTreeUtil.cpp
+
8
−
8
View file @
bcd3540a
...
@@ -49,9 +49,9 @@ void ConfigTreeTopLevel::checkAndInvalidate()
...
@@ -49,9 +49,9 @@ void ConfigTreeTopLevel::checkAndInvalidate()
template
<
typename
T
>
template
<
typename
T
>
void
traverse_recursive
(
void
traverse_recursive
(
boost
::
property_tree
::
ptree
&
parent
,
boost
::
property_tree
::
ptree
&
parent
,
const
boost
::
property_tree
::
ptree
::
path_type
&
child_path
,
boost
::
property_tree
::
ptree
::
path_type
const
&
child_path
,
boost
::
property_tree
::
ptree
&
child
,
boost
::
property_tree
::
ptree
&
child
,
const
fs
::
path
bench_dir
,
fs
::
path
const
&
bench_dir
,
T
&
method
)
T
&
method
)
{
{
using
boost
::
property_tree
::
ptree
;
using
boost
::
property_tree
::
ptree
;
...
@@ -59,7 +59,7 @@ void traverse_recursive(
...
@@ -59,7 +59,7 @@ void traverse_recursive(
method
(
parent
,
child_path
,
child
,
bench_dir
);
method
(
parent
,
child_path
,
child
,
bench_dir
);
for
(
auto
&
[
key
,
tree
]
:
child
)
for
(
auto
&
[
key
,
tree
]
:
child
)
{
{
ptree
::
path_type
cur_path
=
child_path
/
ptree
::
path_type
(
key
);
ptree
::
path_type
const
cur_path
=
child_path
/
ptree
::
path_type
(
key
);
traverse_recursive
(
child
,
cur_path
,
tree
,
bench_dir
,
method
);
traverse_recursive
(
child
,
cur_path
,
tree
,
bench_dir
,
method
);
}
}
}
}
...
@@ -72,10 +72,10 @@ void traverse(boost::property_tree::ptree& parent, const fs::path bench_dir,
...
@@ -72,10 +72,10 @@ void traverse(boost::property_tree::ptree& parent, const fs::path bench_dir,
}
}
void
replace_includes
(
void
replace_includes
(
[[
maybe_unused
]]
const
boost
::
property_tree
::
ptree
&
parent
,
[[
maybe_unused
]]
boost
::
property_tree
::
ptree
const
&
parent
,
[[
maybe_unused
]]
const
boost
::
property_tree
::
ptree
::
path_type
&
child_path
,
[[
maybe_unused
]]
boost
::
property_tree
::
ptree
::
path_type
const
&
child_path
,
boost
::
property_tree
::
ptree
&
child
,
boost
::
property_tree
::
ptree
&
child
,
const
fs
::
path
bench_dir
)
fs
::
path
const
&
bench_dir
)
{
{
using
boost
::
property_tree
::
ptree
;
using
boost
::
property_tree
::
ptree
;
for
(
auto
&
[
key
,
tree
]
:
child
)
for
(
auto
&
[
key
,
tree
]
:
child
)
...
@@ -83,8 +83,8 @@ void replace_includes(
...
@@ -83,8 +83,8 @@ void replace_includes(
if
(
key
==
"include"
)
if
(
key
==
"include"
)
{
{
auto
filename
=
tree
.
get
<
std
::
string
>
(
"<xmlattr>.file"
);
auto
filename
=
tree
.
get
<
std
::
string
>
(
"<xmlattr>.file"
);
auto
filepath
=
fs
::
path
(
filename
);
if
(
auto
const
filepath
=
fs
::
path
(
filename
);
if
(
filepath
.
is_relative
())
filepath
.
is_relative
())
{
{
filename
=
(
bench_dir
/
filepath
).
string
();
filename
=
(
bench_dir
/
filepath
).
string
();
}
}
...
...
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