mirror of
https://github.com/matrix-construct/construct
synced 2024-10-31 19:08:59 +01:00
ircd:#️⃣ Deinline the abstract finalize() defaulter.
This commit is contained in:
parent
5f441c417f
commit
c04ea62135
2 changed files with 7 additions and 4 deletions
|
@ -59,10 +59,7 @@ struct ircd::crh::hash
|
|||
virtual void digest(const mutable_buffer &) const = 0;
|
||||
|
||||
/// Samples the digest and modifies the state (depending on impl)
|
||||
virtual void finalize(const mutable_buffer &b)
|
||||
{
|
||||
digest(b);
|
||||
}
|
||||
virtual void finalize(const mutable_buffer &b);
|
||||
|
||||
/// Appends to the message
|
||||
virtual void update(const const_buffer &) = 0;
|
||||
|
|
|
@ -27,3 +27,9 @@ ircd::crh::hash::operator()(const mutable_buffer &out,
|
|||
update(in);
|
||||
finalize(out);
|
||||
}
|
||||
|
||||
void
|
||||
ircd::crh::hash::finalize(const mutable_buffer &b)
|
||||
{
|
||||
digest(b);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue