mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:57:45 +00:00
AK: Allow getting the key from a RedBlackTree iterator
This commit is contained in:
parent
4ff35c23d3
commit
980f409003
1 changed files with 2 additions and 0 deletions
|
@ -406,6 +406,8 @@ public:
|
||||||
[[nodiscard]] bool is_end() const { return !m_node; }
|
[[nodiscard]] bool is_end() const { return !m_node; }
|
||||||
[[nodiscard]] bool is_begin() const { return !m_prev; }
|
[[nodiscard]] bool is_begin() const { return !m_prev; }
|
||||||
|
|
||||||
|
auto key() const { return m_node->key; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend TreeType;
|
friend TreeType;
|
||||||
explicit RedBlackTreeIterator(typename TreeType::Node* node, typename TreeType::Node* prev = nullptr)
|
explicit RedBlackTreeIterator(typename TreeType::Node* node, typename TreeType::Node* prev = nullptr)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue