Style fix

Move all constructors at the top of classes
This commit is contained in:
louiz’
2016-05-04 14:16:40 +02:00
parent 305e01c0b5
commit af42073830
33 changed files with 157 additions and 174 deletions
+4 -4
View File
@@ -25,7 +25,6 @@ class XmlNode
public:
explicit XmlNode(const std::string& name, XmlNode* parent);
explicit XmlNode(const std::string& name);
XmlNode(XmlNode&& node) = default;
/**
* The copy constructor does not copy the parent attribute. The children
* nodes are all copied recursively.
@@ -42,6 +41,10 @@ public:
this->add_child(std::make_unique<XmlNode>(*child));
}
XmlNode(XmlNode&& node) = default;
XmlNode& operator=(const XmlNode&) = delete;
XmlNode& operator=(XmlNode&&) = delete;
~XmlNode() = default;
void delete_all_children();
@@ -129,9 +132,6 @@ private:
std::vector<std::unique_ptr<XmlNode>> children;
std::string inner;
std::string tail;
XmlNode& operator=(const XmlNode&) = delete;
XmlNode& operator=(XmlNode&&) = delete;
};
std::ostream& operator<<(std::ostream& os, const XmlNode& node);