mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
AK: Mark RedBlackTree functions as [[nodiscard]]
This commit is contained in:
parent
af65c4d8b7
commit
6059d69249
Notes:
sideshowbarker
2024-07-18 08:53:25 +09:00
Author: https://github.com/bgianfo Commit: https://github.com/SerenityOS/serenity/commit/6059d692495 Pull-request: https://github.com/SerenityOS/serenity/pull/8829 Reviewed-by: https://github.com/IdanHo ✅
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_begin() const { return !m_prev; }
|
||||
[[nodiscard]] auto key() const { return m_node->key; }
|
||||
|
||||
private:
|
||||
friend class IntrusiveRedBlackTree;
|
||||
|
@ -159,7 +160,7 @@ public:
|
|||
VERIFY(!is_in_tree());
|
||||
}
|
||||
|
||||
bool is_in_tree()
|
||||
[[nodiscard]] bool is_in_tree() const
|
||||
{
|
||||
return m_in_tree;
|
||||
}
|
||||
|
|
|
@ -406,7 +406,7 @@ public:
|
|||
[[nodiscard]] bool is_end() const { return !m_node; }
|
||||
[[nodiscard]] bool is_begin() const { return !m_prev; }
|
||||
|
||||
auto key() const { return m_node->key; }
|
||||
[[nodiscard]] auto key() const { return m_node->key; }
|
||||
|
||||
private:
|
||||
friend TreeType;
|
||||
|
|
Loading…
Reference in a new issue