mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
AK: Mark RedBlackTree find APIs as [[nodiscard]]
This commit is contained in:
parent
ad6c385c9e
commit
86b02a678c
Notes:
sideshowbarker
2024-07-18 08:53:40 +09:00
Author: https://github.com/bgianfo Commit: https://github.com/SerenityOS/serenity/commit/86b02a678c8 Pull-request: https://github.com/SerenityOS/serenity/pull/8829 Reviewed-by: https://github.com/IdanHo ✅
1 changed files with 2 additions and 2 deletions
|
@ -430,7 +430,7 @@ public:
|
|||
|
||||
using BaseTree = BaseRedBlackTree<K>;
|
||||
|
||||
V* find(K key)
|
||||
[[nodiscard]] V* find(K key)
|
||||
{
|
||||
auto* node = static_cast<Node*>(BaseTree::find(this->m_root, key));
|
||||
if (!node)
|
||||
|
@ -438,7 +438,7 @@ public:
|
|||
return &node->value;
|
||||
}
|
||||
|
||||
V* find_largest_not_above(K key)
|
||||
[[nodiscard]] V* find_largest_not_above(K key)
|
||||
{
|
||||
auto* node = static_cast<Node*>(BaseTree::find_largest_not_above(this->m_root, key));
|
||||
if (!node)
|
||||
|
|
Loading…
Reference in a new issue