From fbdc39de29a0efbcd13ad169c844189168d2110d Mon Sep 17 00:00:00 2001 From: Daniel Neus Date: Mon, 11 Jan 2016 21:52:38 +0100 Subject: cppcheck fixes: Class 'X' has a constructor with 1 argument that is not explicit. --- src/lib/tls/tls_extensions.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/lib/tls/tls_extensions.h') diff --git a/src/lib/tls/tls_extensions.h b/src/lib/tls/tls_extensions.h index 5a8aff9de..a5aac0020 100644 --- a/src/lib/tls/tls_extensions.h +++ b/src/lib/tls/tls_extensions.h @@ -79,7 +79,7 @@ class Server_Name_Indicator final : public Extension Handshake_Extension_Type type() const override { return static_type(); } - Server_Name_Indicator(const std::string& host_name) : + explicit Server_Name_Indicator(const std::string& host_name) : m_sni_host_name(host_name) {} Server_Name_Indicator(TLS_Data_Reader& reader, @@ -106,7 +106,7 @@ class SRP_Identifier final : public Extension Handshake_Extension_Type type() const override { return static_type(); } - SRP_Identifier(const std::string& identifier) : + explicit SRP_Identifier(const std::string& identifier) : m_srp_identifier(identifier) {} SRP_Identifier(TLS_Data_Reader& reader, @@ -135,7 +135,7 @@ class Renegotiation_Extension final : public Extension Renegotiation_Extension() {} - Renegotiation_Extension(const std::vector& bits) : + explicit Renegotiation_Extension(const std::vector& bits) : m_reneg_data(bits) {} Renegotiation_Extension(TLS_Data_Reader& reader, @@ -168,13 +168,13 @@ class Application_Layer_Protocol_Notification final : public Extension /** * Single protocol, used by server */ - Application_Layer_Protocol_Notification(const std::string& protocol) : + explicit Application_Layer_Protocol_Notification(const std::string& protocol) : m_protocols(1, protocol) {} /** * List of protocols, used by client */ - Application_Layer_Protocol_Notification(const std::vector& protocols) : + explicit Application_Layer_Protocol_Notification(const std::vector& protocols) : m_protocols(protocols) {} Application_Layer_Protocol_Notification(TLS_Data_Reader& reader, @@ -211,7 +211,7 @@ class Session_Ticket final : public Extension /** * Extension with ticket, used by client */ - Session_Ticket(const std::vector& session_ticket) : + explicit Session_Ticket(const std::vector& session_ticket) : m_ticket(session_ticket) {} /** @@ -244,7 +244,7 @@ class Supported_Elliptic_Curves final : public Extension std::vector serialize() const override; - Supported_Elliptic_Curves(const std::vector& curves) : + explicit Supported_Elliptic_Curves(const std::vector& curves) : m_curves(curves) {} Supported_Elliptic_Curves(TLS_Data_Reader& reader, @@ -285,7 +285,7 @@ class Signature_Algorithms final : public Extension Signature_Algorithms(const std::vector& hashes, const std::vector& sig_algos); - Signature_Algorithms(const std::vector >& algos) : + explicit Signature_Algorithms(const std::vector >& algos) : m_supported_algos(algos) {} Signature_Algorithms(TLS_Data_Reader& reader, @@ -311,9 +311,9 @@ class SRTP_Protection_Profiles final : public Extension bool empty() const override { return m_pp.empty(); } - SRTP_Protection_Profiles(const std::vector& pp) : m_pp(pp) {} + explicit SRTP_Protection_Profiles(const std::vector& pp) : m_pp(pp) {} - SRTP_Protection_Profiles(u16bit pp) : m_pp(1, pp) {} + explicit SRTP_Protection_Profiles(u16bit pp) : m_pp(1, pp) {} SRTP_Protection_Profiles(TLS_Data_Reader& reader, u16bit extension_size); private: @@ -377,7 +377,7 @@ class Extensions Extensions() {} - Extensions(TLS_Data_Reader& reader) { deserialize(reader); } + explicit Extensions(TLS_Data_Reader& reader) { deserialize(reader); } private: Extensions(const Extensions&) {} -- cgit v1.2.3