mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-25 05:55:13 +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>;
|
using BaseTree = BaseRedBlackTree<K>;
|
||||||
|
|
||||||
V* find(K key)
|
[[nodiscard]] V* find(K key)
|
||||||
{
|
{
|
||||||
auto* node = static_cast<Node*>(BaseTree::find(this->m_root, key));
|
auto* node = static_cast<Node*>(BaseTree::find(this->m_root, key));
|
||||||
if (!node)
|
if (!node)
|
||||||
|
@ -438,7 +438,7 @@ public:
|
||||||
return &node->value;
|
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));
|
auto* node = static_cast<Node*>(BaseTree::find_largest_not_above(this->m_root, key));
|
||||||
if (!node)
|
if (!node)
|
||||||
|
|
Loading…
Add table
Reference in a new issue