summaryrefslogtreecommitdiff
path: root/louloulibs/xmpp/xmpp_parser.cpp
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2015-10-26 20:28:36 +0100
committerFlorent Le Coz <louiz@louiz.org>2015-10-26 20:28:36 +0100
commit450de4c33615fc8cd14bf3a7854ee615ed53df1c (patch)
treee97df1b6737a96fe21f55a37194271134dfc9d81 /louloulibs/xmpp/xmpp_parser.cpp
parent142516a69bb000ce80cbb6509d1f407438a94663 (diff)
downloadbiboumi-450de4c33615fc8cd14bf3a7854ee615ed53df1c.tar.gz
biboumi-450de4c33615fc8cd14bf3a7854ee615ed53df1c.tar.bz2
biboumi-450de4c33615fc8cd14bf3a7854ee615ed53df1c.tar.xz
biboumi-450de4c33615fc8cd14bf3a7854ee615ed53df1c.zip
Style, add a few “this->”
Diffstat (limited to 'louloulibs/xmpp/xmpp_parser.cpp')
-rw-r--r--louloulibs/xmpp/xmpp_parser.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/louloulibs/xmpp/xmpp_parser.cpp b/louloulibs/xmpp/xmpp_parser.cpp
index c1fd63a..f44d49a 100644
--- a/louloulibs/xmpp/xmpp_parser.cpp
+++ b/louloulibs/xmpp/xmpp_parser.cpp
@@ -86,7 +86,7 @@ void* XmppParser::get_buffer(const size_t size) const
void XmppParser::start_element(const XML_Char* name, const XML_Char** attribute)
{
- level++;
+ this->level++;
auto new_node = std::make_unique<XmlNode>(name, this->current_node);
auto new_node_ptr = new_node.get();
@@ -101,15 +101,14 @@ void XmppParser::start_element(const XML_Char* name, const XML_Char** attribute)
this->stream_open_event(*this->current_node);
}
-void XmppParser::end_element(const XML_Char* name)
+void XmppParser::end_element(const XML_Char*)
{
- (void)name;
- level--;
- if (level == 1)
+ this->level--;
+ if (this->level == 1)
{
this->stanza_event(*this->current_node);
}
- if (level == 0)
+ if (this->level == 0)
{
this->stream_close_event(*this->current_node);
this->current_node = nullptr;
@@ -117,7 +116,7 @@ void XmppParser::end_element(const XML_Char* name)
}
else
this->current_node = this->current_node->get_parent();
- if (level == 1)
+ if (this->level == 1)
this->current_node->delete_all_children();
}