Skip to content

Commit 8ae8374

Browse files
committed
Fix cppcheck errors
1 parent f62de58 commit 8ae8374

File tree

1 file changed

+8
-8
lines changed
  • src/request_body_processor

1 file changed

+8
-8
lines changed

src/request_body_processor/xml.cc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ NodeData::~NodeData() {};
3737
/*
3838
* XMLNodes for parsing XML into args
3939
*/
40-
XMLNodes::XMLNodes(Transaction *transaction) {
41-
nodes = {};
42-
node_depth = 0;
43-
currpath = "";
44-
currval = "";
45-
m_transaction = transaction;
46-
}
40+
XMLNodes::XMLNodes(Transaction *transaction)
41+
: nodes{},
42+
node_depth(0),
43+
currpath(""),
44+
currval(""),
45+
m_transaction(transaction)
46+
{}
4747

4848
XMLNodes::~XMLNodes() {};
4949

@@ -76,7 +76,7 @@ class MSCSAXHandler {
7676
void onEndElement(void * ctx, const xmlChar *localname) {
7777
std::string name = reinterpret_cast<const char*>(localname);
7878
XMLNodes* xml_data = static_cast<XMLNodes*>(ctx);
79-
std::shared_ptr<NodeData>& nd = xml_data->nodes[xml_data->nodes.size()-1];
79+
const std::shared_ptr<NodeData>& nd = xml_data->nodes[xml_data->nodes.size()-1];
8080
if (nd->has_child == true) {
8181
// check the return value
8282
// if it false, then stop parsing

0 commit comments

Comments
 (0)