Skip to content

Commit

Permalink
Removed non needed function:
Browse files Browse the repository at this point in the history
  • Loading branch information
spirosmaggioros committed Jul 15, 2024
1 parent cdbe49b commit eca33f3
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/classes/tree/red_black_tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@ template <typename T> class red_black_tree {
std::shared_ptr<node> root;
size_t _size{};

std::shared_ptr<node> new_node(T &key, std::shared_ptr<node> p = nullptr) {
std::shared_ptr<node> t_node = std::make_shared<node>(key, p);
return t_node;
}

void _left_rotate(std::shared_ptr<node> t_node) {
std::shared_ptr<node> x = t_node->right;
x->parent = t_node->parent;
Expand Down Expand Up @@ -332,7 +327,7 @@ template <typename T> class red_black_tree {
else
x = x->right;
}
std::shared_ptr<node> t_node = this->new_node(key, p);
std::shared_ptr<node> t_node = std::make_shared<node>(key, p);
if(p == nullptr)
this->root = t_node;
else{
Expand Down

0 comments on commit eca33f3

Please sign in to comment.