aboutsummaryrefslogtreecommitdiff
path: root/src/xml/XmlNode.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-01-02 18:49:31 +0800
committercrupest <crupest@outlook.com>2022-01-02 18:49:31 +0800
commit18099ad8f5c24b1c2b1c92238dbc54912eab0406 (patch)
tree514207d630a2100262aedaea276ea259bbc108b7 /src/xml/XmlNode.cpp
parent96a93e17baaff2c2050eba2afada639e93001232 (diff)
downloadcru-18099ad8f5c24b1c2b1c92238dbc54912eab0406.tar.gz
cru-18099ad8f5c24b1c2b1c92238dbc54912eab0406.tar.bz2
cru-18099ad8f5c24b1c2b1c92238dbc54912eab0406.zip
...
Diffstat (limited to 'src/xml/XmlNode.cpp')
-rw-r--r--src/xml/XmlNode.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/xml/XmlNode.cpp b/src/xml/XmlNode.cpp
index f4b43ea6..d6203973 100644
--- a/src/xml/XmlNode.cpp
+++ b/src/xml/XmlNode.cpp
@@ -1,6 +1,12 @@
#include "cru/xml/XmlNode.hpp"
namespace cru::xml {
+XmlElementNode::~XmlElementNode() {
+ for (auto child : children_) {
+ delete child;
+ }
+}
+
void XmlElementNode::AddAttribute(String key, String value) {
attributes_[std::move(key)] = std::move(value);
}