summaryrefslogtreecommitdiff
path: root/Kernel/Random.h
diff options
context:
space:
mode:
authorBrian Gianforcaro <b.gianfo@gmail.com>2020-12-26 01:47:08 -0800
committerAndreas Kling <kling@serenityos.org>2020-12-27 11:09:30 +0100
commit815d39886f4f0e835bb6300682bafc7dc266ac2b (patch)
tree6daf3e97a68b9ebf260a6ab339049600eb4cdc99 /Kernel/Random.h
parent21a5524d010d5ef0ab8b5cccd82df9484e484cb2 (diff)
downloadserenity-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.h4
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;
}