Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
b5d504ae
Commit
b5d504ae
authored
Aug 13, 2013
by
Tristan Matthews
Browse files
* #28351: yamlnode: use range-based for loops
parent
a33423ea
Changes
1
Hide whitespace changes
Inline
Side-by-side
daemon/src/config/yamlnode.cpp
View file @
b5d504ae
...
...
@@ -52,8 +52,8 @@ YamlNode *YamlDocument::popNode()
void
YamlDocument
::
deleteChildNodes
()
{
for
(
Sequence
::
iterator
it
=
doc_
.
begin
();
it
!=
doc_
.
end
();
++
it
)
{
YamlNode
*
yamlNode
=
static_cast
<
YamlNode
*>
(
*
it
);
for
(
auto
&
it
:
doc_
)
{
YamlNode
*
yamlNode
=
static_cast
<
YamlNode
*>
(
it
);
yamlNode
->
deleteChildNodes
();
delete
yamlNode
;
...
...
@@ -124,8 +124,8 @@ void MappingNode::getValue(const std::string &key, std::string *v) const
void
MappingNode
::
deleteChildNodes
()
{
for
(
YamlNodeMap
::
iterator
it
=
map_
.
begin
();
it
!=
map_
.
end
();
++
it
)
{
YamlNode
*
yamlNode
=
static_cast
<
YamlNode
*>
(
it
->
second
);
for
(
auto
&
it
:
map_
)
{
YamlNode
*
yamlNode
=
static_cast
<
YamlNode
*>
(
it
.
second
);
if
(
!
yamlNode
)
continue
;
...
...
@@ -144,8 +144,8 @@ void SequenceNode::addNode(YamlNode *node)
void
SequenceNode
::
deleteChildNodes
()
{
for
(
Sequence
::
iterator
it
=
seq_
.
begin
();
it
!=
seq_
.
end
();
++
it
)
{
YamlNode
*
yamlNode
=
static_cast
<
YamlNode
*>
(
*
it
);
for
(
auto
&
it
:
seq_
)
{
YamlNode
*
yamlNode
=
static_cast
<
YamlNode
*>
(
it
);
yamlNode
->
deleteChildNodes
();
delete
yamlNode
;
...
...
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