From 84ecdcbca9e55b1f57fbb832e12ff4fdbb86e7c9 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Mon, 4 Dec 2023 01:37:11 +0100 Subject: core: Fixed broken tree impl. --- c++/core/tree.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'c++/core/tree.h') diff --git a/c++/core/tree.h b/c++/core/tree.h index 43f6c2c..68fa20a 100644 --- a/c++/core/tree.h +++ b/c++/core/tree.h @@ -9,7 +9,7 @@ namespace saw { /** * Container with a simplistic approach to a branch */ -template +template class branch; /** @@ -81,7 +81,7 @@ public: std::size_t index = size(); try { - children_.emplace_back(tree{}); + children_.emplace_back(Tree{}); }catch(const std::exception& e){ (void)e; @@ -123,7 +123,6 @@ private: * We're friend classing the tree since it's way easier this way and the branch and tree * class are intertwined heavily anyway. */ - friend class Tree; public: /** * @@ -178,7 +177,6 @@ public: template error_or extract(){ - error_or reserve(std::size_t siz){ if(!is()){ return make_error(); } @@ -231,11 +229,11 @@ class tree { return data_.size(); } - error_or add() { + error_or add() { return data_.add(); } - error_or add(T leaf){ + error_or add(T leaf){ return data_.add(std::move(leaf)); } -- cgit v1.2.3