From 917a73d048e27cdfe9bf51e0ead50db36f3e9b73 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Fri, 26 Jan 2018 21:58:52 -0800 Subject: [PATCH] ircd: Final hints for devirtualization opportunities. --- include/ircd/client.h | 2 +- include/ircd/exception.h | 2 +- include/ircd/hash.h | 9 +++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/ircd/client.h b/include/ircd/client.h index 1e8f97418..b7d33c32f 100644 --- a/include/ircd/client.h +++ b/include/ircd/client.h @@ -68,7 +68,7 @@ struct ircd::client client(const client &) = delete; client &operator=(client &&) = delete; client &operator=(const client &) = delete; - virtual ~client() noexcept; + ~client() noexcept; friend ipport remote(const client &); friend ipport local(const client &); diff --git a/include/ircd/exception.h b/include/ircd/exception.h index 92b2c51eb..38d07bcfe 100644 --- a/include/ircd/exception.h +++ b/include/ircd/exception.h @@ -80,7 +80,7 @@ struct ircd::exception ssize_t generate(const char *const &fmt, const va_rtti &ap) noexcept; public: - const char *what() const noexcept override + const char *what() const noexcept final override { return buf; } diff --git a/include/ircd/hash.h b/include/ircd/hash.h index 683c70270..7ca416ebf 100644 --- a/include/ircd/hash.h +++ b/include/ircd/hash.h @@ -92,6 +92,7 @@ struct ircd::crh::hash /// SHA-256 hashing device. struct ircd::crh::sha256 +final :hash { struct ctx; @@ -107,10 +108,10 @@ struct ircd::crh::sha256 std::unique_ptr ctx; public: - size_t length() const override final; - void digest(const mutable_raw_buffer &) const override final; - void finalize(const mutable_raw_buffer &) override final; - void update(const const_raw_buffer &) override final; + size_t length() const override; + void digest(const mutable_raw_buffer &) const override; + void finalize(const mutable_raw_buffer &) override; + void update(const const_raw_buffer &) override; sha256(const mutable_raw_buffer &, const const_raw_buffer &); sha256(const const_raw_buffer &);