From 1bfe6e806a2fb448b2d4b83c3e40e8d06d8d9192 Mon Sep 17 00:00:00 2001 From: Pagwin Date: Fri, 22 Nov 2024 01:37:39 -0500 Subject: [PATCH] typo fix and trying list instead of vector --- Map.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Map.hpp b/Map.hpp index b82f0e2..1dff8e0 100644 --- a/Map.hpp +++ b/Map.hpp @@ -5,10 +5,10 @@ #include #include #include +#include #include #include #include -#include // everything is super interconnected so some forward declarations are needed at // various points @@ -36,7 +36,7 @@ template struct BookKeeping { friend class Map; Map &container; ValueType value; - typename std::vector::iterator self; + typename std::list::iterator self; Color color; // nullptr indicates empty Self *parent; @@ -258,7 +258,7 @@ private: Node *root; Node *min; Node *max; - std::vector nodes; + std::list nodes; public: Map() : root{nullptr}, min{nullptr}, max{nullptr}, nodes{} {} @@ -430,7 +430,7 @@ private: Direction dir; while (current != nullptr && current->value.first != key) { parent = current; - if (current->value.fist < key) { + if (current->value.first < key) { dir = Direction::Left; current = current->left; } else {