diff options
author | Michel Hermier <michel.hermier@gmail.com> | 2022-01-04 02:41:27 +0100 |
---|---|---|
committer | Ali Mohammad Pur <Ali.mpfard@gmail.com> | 2022-01-05 01:07:21 +0330 |
commit | 4e851145baca6cabb02c13c36e19c8dd3ef61003 (patch) | |
tree | 9a26579c19217b230dc12650fdae0e398c71c411 /Userland/Libraries/LibCrypto/Hash/HashManager.h | |
parent | 1f4a27b80ea0c4ea09101d115a1ca98b7be45252 (diff) | |
download | serenity-4e851145baca6cabb02c13c36e19c8dd3ef61003.zip |
LibCrypto: Make `MultiHashDigestVariant` getters `const` and `nodiscard`
Diffstat (limited to 'Userland/Libraries/LibCrypto/Hash/HashManager.h')
-rw-r--r-- | Userland/Libraries/LibCrypto/Hash/HashManager.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibCrypto/Hash/HashManager.h b/Userland/Libraries/LibCrypto/Hash/HashManager.h index 522565a8b1..b161ae87d6 100644 --- a/Userland/Libraries/LibCrypto/Hash/HashManager.h +++ b/Userland/Libraries/LibCrypto/Hash/HashManager.h @@ -59,14 +59,14 @@ struct MultiHashDigestVariant { { } - const u8* immutable_data() const + [[nodiscard]] const u8* immutable_data() const { return m_digest.visit( [&](const Empty&) -> const u8* { VERIFY_NOT_REACHED(); }, [&](const auto& value) { return value.immutable_data(); }); } - size_t data_length() + [[nodiscard]] size_t data_length() const { return m_digest.visit( [&](const Empty&) -> size_t { VERIFY_NOT_REACHED(); }, |