AK: Mark RedBlackTree find APIs as [[nodiscard]]

This commit is contained in:
Brian Gianforcaro 2021-07-16 22:59:13 -07:00 committed by Andreas Kling
parent ad6c385c9e
commit 86b02a678c

View file

@ -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)