Fix -Wmissing-field-initializers

This commit is contained in:
Alex Hultman
2020-11-30 23:37:49 +01:00
parent a6a2a648c9
commit 1c5d201846
3 changed files with 6 additions and 4 deletions
+3 -1
View File
@@ -61,6 +61,8 @@ private:
std::vector<std::unique_ptr<Node>> children;
std::vector<uint32_t> handlers;
bool isHighPriority;
Node(std::string name) : name(name) {}
} root = {"rootNode"};
/* Advance from parent to child, adding child if necessary */
@@ -72,7 +74,7 @@ private:
}
/* Insert sorted, but keep order if parent is root (we sort methods by priority elsewhere) */
std::unique_ptr<Node> newNode(new Node({child}));
std::unique_ptr<Node> newNode(new Node(child));
newNode->isHighPriority = isHighPriority;
return parent->children.emplace(std::upper_bound(parent->children.begin(), parent->children.end(), newNode, [parent, this](auto &a, auto &b) {