Fix cppcheck errors

This commit is contained in:
Ervin Hegedus 2025-04-20 19:01:45 +02:00
parent f62de58632
commit 8ae8374be5
No known key found for this signature in database
GPG Key ID: 5FA5BC3F5EC41F61

View File

@ -37,13 +37,13 @@ NodeData::~NodeData() {};
/* /*
* XMLNodes for parsing XML into args * XMLNodes for parsing XML into args
*/ */
XMLNodes::XMLNodes(Transaction *transaction) { XMLNodes::XMLNodes(Transaction *transaction)
nodes = {}; : nodes{},
node_depth = 0; node_depth(0),
currpath = ""; currpath(""),
currval = ""; currval(""),
m_transaction = transaction; m_transaction(transaction)
} {}
XMLNodes::~XMLNodes() {}; XMLNodes::~XMLNodes() {};
@ -76,7 +76,7 @@ class MSCSAXHandler {
void onEndElement(void * ctx, const xmlChar *localname) { void onEndElement(void * ctx, const xmlChar *localname) {
std::string name = reinterpret_cast<const char*>(localname); std::string name = reinterpret_cast<const char*>(localname);
XMLNodes* xml_data = static_cast<XMLNodes*>(ctx); XMLNodes* xml_data = static_cast<XMLNodes*>(ctx);
std::shared_ptr<NodeData>& nd = xml_data->nodes[xml_data->nodes.size()-1]; const std::shared_ptr<NodeData>& nd = xml_data->nodes[xml_data->nodes.size()-1];
if (nd->has_child == true) { if (nd->has_child == true) {
// check the return value // check the return value
// if it false, then stop parsing // if it false, then stop parsing