Kernel: Tag more methods and types as [[nodiscard]]

Tag methods at where not obvserving the return value is an obvious error
with [[nodiscard]] to catch potential future bugs.
This commit is contained in:
Brian Gianforcaro 2020-12-26 01:47:08 -08:00 committed by Andreas Kling
commit 815d39886f
Notes: sideshowbarker 2024-07-19 00:34:07 +09:00
3 changed files with 26 additions and 24 deletions

View file

@ -87,12 +87,12 @@ public:
m_pools[pool].update(reinterpret_cast<const u8*>(&event_data), sizeof(T));
}
bool is_seeded() const
[[nodiscard]] bool is_seeded() const
{
return m_reseed_number > 0;
}
bool is_ready() const
[[nodiscard]] bool is_ready() const
{
return is_seeded() || m_p0_len >= reseed_threshold;
}