mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 00:50:22 +00:00
AK: Allow getting the key from a RedBlackTree iterator
This commit is contained in:
parent
4ff35c23d3
commit
980f409003
Notes:
sideshowbarker
2024-07-18 08:59:44 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/980f4090033
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_begin() const { return !m_prev; }
|
||||
|
||||
auto key() const { return m_node->key; }
|
||||
|
||||
private:
|
||||
friend TreeType;
|
||||
explicit RedBlackTreeIterator(typename TreeType::Node* node, typename TreeType::Node* prev = nullptr)
|
||||
|
|
Loading…
Reference in a new issue