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
01728687
Commit
01728687
authored
9 years ago
by
Christoph Lehmann
Browse files
Options
Downloads
Patches
Plain Diff
[BL] Dima's comments: updated doc, changed return value.
parent
e3191b83
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/ConfigTreeNew.cpp
+2
-3
2 additions, 3 deletions
BaseLib/ConfigTreeNew.cpp
BaseLib/ConfigTreeNew.h
+5
-5
5 additions, 5 deletions
BaseLib/ConfigTreeNew.h
with
7 additions
and
8 deletions
BaseLib/ConfigTreeNew.cpp
+
2
−
3
View file @
01728687
...
...
@@ -94,9 +94,8 @@ getConfSubtreeOptional(std::string const& root)
if
(
subtree
)
{
markVisited
(
root
);
boost
::
optional
<
ConfigTreeNew
>
t
;
t
.
emplace
(
*
subtree
,
*
this
,
root
);
return
std
::
move
(
t
);
return
boost
::
optional
<
ConfigTreeNew
>
(
std
::
move
(
ConfigTreeNew
(
*
subtree
,
*
this
,
root
)));
}
else
{
markVisited
(
root
,
true
);
return
boost
::
optional
<
ConfigTreeNew
>
();
...
...
This diff is collapsed.
Click to expand it.
BaseLib/ConfigTreeNew.h
+
5
−
5
View file @
01728687
...
...
@@ -170,8 +170,8 @@ public:
/*! Creates a new instance wrapping the given Boost Property Tree.
*
* \param tree the Boost Property Tree to be wrapped
* \param
on
error callback function to be called on error.
* \param
on
warning callback function to be called on warning.
* \param error
_cb
callback function to be called on error.
* \param warning
_cb
callback function to be called on warning.
*
* The callback functions must be valid callable functions, i.e. not nullptr's.
* They are configurable in order to make unit tests of this class easier.
...
...
@@ -185,9 +185,6 @@ public:
Callback
const
&
error_cb
=
onerror
,
Callback
const
&
warning_cb
=
onwarning
);
//! Used for wrapping a subtree
explicit
ConfigTreeNew
(
PTree
const
&
tree
,
ConfigTreeNew
const
&
parent
,
std
::
string
const
&
root
);
//! copying is not compatible with the semantics of this class
ConfigTreeNew
(
ConfigTreeNew
const
&
)
=
delete
;
...
...
@@ -314,6 +311,9 @@ private:
std
::
type_index
type
;
};
//! Used for wrapping a subtree
explicit
ConfigTreeNew
(
PTree
const
&
tree
,
ConfigTreeNew
const
&
parent
,
std
::
string
const
&
root
);
//! Called if an error occurs. Will call the error callback.
//! This method only acts as a helper method.
void
error
(
std
::
string
const
&
message
);
...
...
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