From 353331954e806a8d336132c740b8888bc7bf3650 Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Sat, 30 Sep 2017 12:42:03 -0400 Subject: Use explicit on more single-argument constructors --- src/lib/kdf/kdf1_iso18033/kdf1_iso18033.h | 2 +- src/lib/kdf/sp800_108/sp800_108.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/lib/kdf') diff --git a/src/lib/kdf/kdf1_iso18033/kdf1_iso18033.h b/src/lib/kdf/kdf1_iso18033/kdf1_iso18033.h index fcd465436..7a95a093b 100644 --- a/src/lib/kdf/kdf1_iso18033/kdf1_iso18033.h +++ b/src/lib/kdf/kdf1_iso18033/kdf1_iso18033.h @@ -31,7 +31,7 @@ class BOTAN_PUBLIC_API(2,0) KDF1_18033 final : public KDF /** * @param h hash function to use */ - KDF1_18033(HashFunction* h) : m_hash(h) {} + explicit KDF1_18033(HashFunction* h) : m_hash(h) {} private: std::unique_ptr m_hash; }; diff --git a/src/lib/kdf/sp800_108/sp800_108.h b/src/lib/kdf/sp800_108/sp800_108.h index d74c876f7..25802f69e 100644 --- a/src/lib/kdf/sp800_108/sp800_108.h +++ b/src/lib/kdf/sp800_108/sp800_108.h @@ -48,7 +48,7 @@ class BOTAN_PUBLIC_API(2,0) SP800_108_Counter final : public KDF /** * @param mac MAC algorithm to use */ - SP800_108_Counter(MessageAuthenticationCode* mac) : m_prf(mac) {} + explicit SP800_108_Counter(MessageAuthenticationCode* mac) : m_prf(mac) {} private: std::unique_ptr m_prf; }; @@ -85,7 +85,7 @@ class BOTAN_PUBLIC_API(2,0) SP800_108_Feedback final : public KDF const uint8_t salt[], size_t salt_len, const uint8_t label[], size_t label_len) const override; - SP800_108_Feedback(MessageAuthenticationCode* mac) : m_prf(mac) {} + explicit SP800_108_Feedback(MessageAuthenticationCode* mac) : m_prf(mac) {} private: std::unique_ptr m_prf; }; @@ -122,7 +122,7 @@ class BOTAN_PUBLIC_API(2,0) SP800_108_Pipeline final : public KDF const uint8_t salt[], size_t salt_len, const uint8_t label[], size_t label_len) const override; - SP800_108_Pipeline(MessageAuthenticationCode* mac) : m_prf(mac) {} + explicit SP800_108_Pipeline(MessageAuthenticationCode* mac) : m_prf(mac) {} private: std::unique_ptr m_prf; -- cgit v1.2.3