Skip to content

Commit

Permalink
code quality
Browse files Browse the repository at this point in the history
  • Loading branch information
Kishan-Ved committed Jun 11, 2024
1 parent 216a9de commit 10ef274
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pydatastructs/trees/_backend/cpp/RedBlackTree.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ static PyObject* RedBlackTree__delete_root(RedBlackTree* self, PyObject *args) {
if (RedBlackTree__is_leaf(self, Py_BuildValue("(O)", node_idx)) == Py_True) {
reinterpret_cast<TreeNode*>(bt->tree->_one_dimensional_array->_data[PyLong_AsLong(bt->root_idx)])->data = Py_None;
reinterpret_cast<TreeNode*>(bt->tree->_one_dimensional_array->_data[PyLong_AsLong(bt->root_idx)])->key = Py_None;
}
}
else if (RedBlackTree__has_one_child(self, Py_BuildValue("(O)", node_idx)) == Py_True) {
PyObject* root_key = RedBlackTree__transplant_values(self, Py_BuildValue("(OO)", node_idx, node_idx1));
PyObject* new_indices = ArrayForTrees_delete(bt->tree, Py_BuildValue("(O)", node_idx1));
Expand Down

0 comments on commit 10ef274

Please sign in to comment.