From 7ca975d6a0fb47fe832b3dc790a80ded177850a0 Mon Sep 17 00:00:00 2001 From: Brett Date: Tue, 10 Jan 2023 22:16:57 -0500 Subject: [PATCH] Add some debug as insert appears to be broken --- include/blt/std/binary_tree.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/blt/std/binary_tree.h b/include/blt/std/binary_tree.h index db41e70..a648d1d 100644 --- a/include/blt/std/binary_tree.h +++ b/include/blt/std/binary_tree.h @@ -61,7 +61,7 @@ namespace blt { } } - BST_node* search(BST_node*& parent, const T& element) { + BST_node* search(BST_node*& parent, const T& element) const { BST_node* searchNode = m_root; // basically we are iterating through the tree looking for a valid node to insert into. while (true) { @@ -146,6 +146,10 @@ namespace blt { return inOrderTraverse(m_root); } + BST_node* debug(){ + return m_root; + } + ~node_binary_search_tree() { delete (m_root); }