mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 09:37:34 +00:00
AK: Mark RedBlackTree find APIs as [[nodiscard]]
This commit is contained in:
parent
ad6c385c9e
commit
86b02a678c
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
Add a link
Reference in a new issue