mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:57:45 +00:00
AK: Mark RedBlackTree functions as [[nodiscard]]
This commit is contained in:
parent
af65c4d8b7
commit
6059d69249
2 changed files with 3 additions and 2 deletions
|
@ -83,6 +83,7 @@ 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; }
|
||||||
|
[[nodiscard]] auto key() const { return m_node->key; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class IntrusiveRedBlackTree;
|
friend class IntrusiveRedBlackTree;
|
||||||
|
@ -159,7 +160,7 @@ public:
|
||||||
VERIFY(!is_in_tree());
|
VERIFY(!is_in_tree());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool is_in_tree()
|
[[nodiscard]] bool is_in_tree() const
|
||||||
{
|
{
|
||||||
return m_in_tree;
|
return m_in_tree;
|
||||||
}
|
}
|
||||||
|
|
|
@ -406,7 +406,7 @@ 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; }
|
[[nodiscard]] auto key() const { return m_node->key; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend TreeType;
|
friend TreeType;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue