mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-09 19:16:02 +00:00
LibCrypto: Make MultiHashDigestVariant
getters const
and nodiscard
This commit is contained in:
parent
1f4a27b80e
commit
4e851145ba
Notes:
sideshowbarker
2024-07-17 21:39:46 +09:00
Author: https://github.com/mhermier
Commit: 4e851145ba
Pull-request: https://github.com/SerenityOS/serenity/pull/11605
Reviewed-by: https://github.com/alimpfard
1 changed files with 2 additions and 2 deletions
|
@ -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(); },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue