From 0cf2e5491e8f7297face6d011752969100e725ab Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Thu, 5 Oct 2017 10:28:33 -0400 Subject: Mark some functions of MDx_HashFunction final The class itself can't be final but we can final the overrides from HashFunction, which helps the compiler devirtualize. --- src/lib/hash/mdx_hash/mdx_hash.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib') diff --git a/src/lib/hash/mdx_hash/mdx_hash.h b/src/lib/hash/mdx_hash/mdx_hash.h index 5b5aef7b0..f958e9fb7 100644 --- a/src/lib/hash/mdx_hash/mdx_hash.h +++ b/src/lib/hash/mdx_hash/mdx_hash.h @@ -29,10 +29,10 @@ class BOTAN_PUBLIC_API(2,0) MDx_HashFunction : public HashFunction bool big_bit_endian, size_t counter_size = 8); - size_t hash_block_size() const override { return m_buffer.size(); } + size_t hash_block_size() const override final { return m_buffer.size(); } protected: - void add_data(const uint8_t input[], size_t length) override; - void final_result(uint8_t output[]) override; + void add_data(const uint8_t input[], size_t length) override final; + void final_result(uint8_t output[]) override final; /** * Run the hash's compression function over a set of blocks -- cgit v1.2.3