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
Chaofan Chen
ogs
Commits
c85a3bba
Commit
c85a3bba
authored
11 months ago
by
Dmitri Naumov
Browse files
Options
Downloads
Patches
Plain Diff
[BL] Unify decl. and def. argument names
parent
2d0d335b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
BaseLib/ConfigTree.cpp
+6
-6
6 additions, 6 deletions
BaseLib/ConfigTree.cpp
BaseLib/ConfigTree.h
+1
-1
1 addition, 1 deletion
BaseLib/ConfigTree.h
with
7 additions
and
7 deletions
BaseLib/ConfigTree.cpp
+
6
−
6
View file @
c85a3bba
...
@@ -115,23 +115,23 @@ ConfigTree& ConfigTree::operator=(ConfigTree&& other)
...
@@ -115,23 +115,23 @@ ConfigTree& ConfigTree::operator=(ConfigTree&& other)
return
*
this
;
return
*
this
;
}
}
ConfigTree
ConfigTree
::
getConfigParameter
(
std
::
string
const
&
root
)
const
ConfigTree
ConfigTree
::
getConfigParameter
(
std
::
string
const
&
param
)
const
{
{
auto
ct
=
getConfigSubtree
(
root
);
auto
ct
=
getConfigSubtree
(
param
);
if
(
ct
.
hasChildren
())
if
(
ct
.
hasChildren
())
{
{
error
(
"Requested parameter <"
+
root
+
"> actually is a subtree."
);
error
(
"Requested parameter <"
+
param
+
"> actually is a subtree."
);
}
}
return
ct
;
return
ct
;
}
}
std
::
optional
<
ConfigTree
>
ConfigTree
::
getConfigParameterOptional
(
std
::
optional
<
ConfigTree
>
ConfigTree
::
getConfigParameterOptional
(
std
::
string
const
&
root
)
const
std
::
string
const
&
param
)
const
{
{
auto
ct
=
getConfigSubtreeOptional
(
root
);
auto
ct
=
getConfigSubtreeOptional
(
param
);
if
(
ct
&&
ct
->
hasChildren
())
if
(
ct
&&
ct
->
hasChildren
())
{
{
error
(
"Requested parameter <"
+
root
+
"> actually is a subtree."
);
error
(
"Requested parameter <"
+
param
+
"> actually is a subtree."
);
}
}
return
ct
;
return
ct
;
}
}
...
...
This diff is collapsed.
Click to expand it.
BaseLib/ConfigTree.h
+
1
−
1
View file @
c85a3bba
...
@@ -382,7 +382,7 @@ public:
...
@@ -382,7 +382,7 @@ public:
* \pre \c param must not have been read before from this ConfigTree.
* \pre \c param must not have been read before from this ConfigTree.
*/
*/
std
::
optional
<
ConfigTree
>
getConfigParameterOptional
(
std
::
optional
<
ConfigTree
>
getConfigParameterOptional
(
std
::
string
const
&
root
)
const
;
std
::
string
const
&
param
)
const
;
/*! Fetches all parameters with name \c param from the current level of the
/*! Fetches all parameters with name \c param from the current level of the
* tree.
* tree.
...
...
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