From 466c09b9444e3b95d086cbc7bd45a4cd240e731e Mon Sep 17 00:00:00 2001 From: Iurii Tatishchev Date: Thu, 20 Jun 2024 12:21:24 -0700 Subject: [PATCH] minor fixes for indented bst print --- BinaryTree.h | 4 ++-- CPU.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/BinaryTree.h b/BinaryTree.h index 29d6527..e30b979 100644 --- a/BinaryTree.h +++ b/BinaryTree.h @@ -28,7 +28,7 @@ public: void postOrder(void visit(const T&)) const { _postorder(visit, root); } - void printTree(void visit(const T&, int)) const { _printTree(visit, rootPtr, 1); } + void printTree(void visit(const T&, int)) const { _printTree(visit, root, 1); } // abstract functions to be implemented by derived class virtual void insert(const T& newData) = 0; @@ -99,7 +99,7 @@ template void BinaryTree::_printTree(void visit(const T&, int), BinaryTreeNode* nodePtr, int level) const { if (nodePtr) { - ItemType item = nodePtr->getItem(); + T item = nodePtr->getItem(); visit(item, level); _printTree(visit, nodePtr->getRightPtr(), level + 1); _printTree(visit, nodePtr->getLeftPtr(), level + 1); diff --git a/CPU.h b/CPU.h index 5e965e2..266a9b2 100644 --- a/CPU.h +++ b/CPU.h @@ -74,7 +74,7 @@ public: void display(const CPU &cpu); -void iDisplay(const string &cpuId, int level); +void iDisplay(const std::string &cpuId, int level); void rowDisplay(const CPU &cpu, const std::vector &widths);