diff options
author | Brian Gianforcaro <b.gianfo@gmail.com> | 2020-12-26 01:47:08 -0800 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-12-27 11:09:30 +0100 |
commit | 815d39886f4f0e835bb6300682bafc7dc266ac2b (patch) | |
tree | 6daf3e97a68b9ebf260a6ab339049600eb4cdc99 /Kernel/Random.h | |
parent | 21a5524d010d5ef0ab8b5cccd82df9484e484cb2 (diff) | |
download | serenity-815d39886f4f0e835bb6300682bafc7dc266ac2b.zip |
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.
Diffstat (limited to 'Kernel/Random.h')
-rw-r--r-- | Kernel/Random.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Random.h b/Kernel/Random.h index 5fe130d1c3..db4c29b4c3 100644 --- a/Kernel/Random.h +++ b/Kernel/Random.h @@ -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; } |