Style fix
Move all constructors at the top of classes
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user