Skip to content

Commit 9bbfd1c

Browse files
committed
removed unnecessary code
1 parent 26992d0 commit 9bbfd1c

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

pydatastructs/trees/_backend/cpp/SplayTree.hpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -267,16 +267,7 @@ static PyObject* SplayTree_split(SplayTree *self, PyObject* args) {
267267
}
268268
SplayTree* other = reinterpret_cast<SplayTree*>(SplayTree___new__(self->type, Py_BuildValue("(OOOO)", Py_None, Py_None, bt->comparator, PyZero), PyDict_New()));
269269

270-
// SplayTree* other = reinterpret_cast<SplayTree*>(PyObject_GetItem(args, PyOne));
271270
if (reinterpret_cast<TreeNode*>(bt->tree->_one_dimensional_array->_data[PyLong_AsLong(bt->root_idx)])->right != Py_None) {
272-
// if (PyType_Ready(&BinaryTreeTraversalType) < 0) { // This has to be present to finalize a type object. This should be called on all type objects to finish their initialization.
273-
// return NULL;
274-
// }
275-
// BinaryTreeTraversal* traverse = reinterpret_cast<BinaryTreeTraversal*>(BinaryTreeTraversal___new__(&BinaryTreeTraversalType, Py_BuildValue("(O)", self), PyDict_New()));
276-
// PyObject* kwd_dict = PyDict_New();
277-
// PyDict_SetItemString(kwd_dict, "node", reinterpret_cast<TreeNode*>(bt->tree->_one_dimensional_array->_data[PyLong_AsLong(bt->root_idx)])->right);
278-
// PyDict_SetItemString(kwd_dict, "order", PyUnicode_FromString("pre_order"));
279-
// PyObject* elements = BinaryTreeTraversal_depth_first_search(traverse, Py_BuildValue("()"), kwd_dict);
280271
PyObject* elements = SplayTree__pre_order(self, Py_BuildValue("(O)", reinterpret_cast<TreeNode*>(bt->tree->_one_dimensional_array->_data[PyLong_AsLong(bt->root_idx)])->right));
281272
for (int i=0; i<PyList_Size(elements); i++) {
282273
SelfBalancingBinaryTree_insert(other->sbbt, Py_BuildValue("(OO)", reinterpret_cast<TreeNode*>( PyList_GetItem(elements, i))->key, reinterpret_cast<TreeNode*>( PyList_GetItem(elements, i))->data));

0 commit comments

Comments
 (0)