From db8bfdff0751aa116748912c848804046f7161b3 Mon Sep 17 00:00:00 2001 From: Ronan Abhamon Date: Tue, 10 Oct 2017 14:21:50 +0200 Subject: [PATCH] fix(Core): add explicit on some constructors --- src/conference/participant.h | 4 ++-- src/db/abstract/abstract-db-p.h | 2 ++ src/db/provider/db-session.h | 2 +- src/nat/ice-agent.h | 2 +- src/utils/payload-type-handler.h | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/conference/participant.h b/src/conference/participant.h index 7b092bb7f..dea93ed98 100644 --- a/src/conference/participant.h +++ b/src/conference/participant.h @@ -45,8 +45,8 @@ class Participant : public Object { friend class RemoteConference; public: - Participant (const Address &address); - Participant (Address &&address); + explicit Participant (const Address &address); + explicit Participant (Address &&address); const Address& getAddress () const; diff --git a/src/db/abstract/abstract-db-p.h b/src/db/abstract/abstract-db-p.h index 852805d39..2348ca74f 100644 --- a/src/db/abstract/abstract-db-p.h +++ b/src/db/abstract/abstract-db-p.h @@ -30,6 +30,8 @@ LINPHONE_BEGIN_NAMESPACE class AbstractDbPrivate : public ObjectPrivate { public: + AbstractDbPrivate () = default; + DbSession dbSession; private: diff --git a/src/db/provider/db-session.h b/src/db/provider/db-session.h index aed758c2a..5cfd61e05 100644 --- a/src/db/provider/db-session.h +++ b/src/db/provider/db-session.h @@ -43,7 +43,7 @@ public: Soci }; - DbSession (Type type = None); + explicit DbSession (Type type = None); DbSession (const DbSession &src); DbSession &operator= (const DbSession &src); diff --git a/src/nat/ice-agent.h b/src/nat/ice-agent.h index 98101488d..42c293312 100644 --- a/src/nat/ice-agent.h +++ b/src/nat/ice-agent.h @@ -39,7 +39,7 @@ LINPHONE_BEGIN_NAMESPACE class IceAgent { public: - IceAgent (MediaSession &mediaSession) : mediaSession(mediaSession) {} + explicit IceAgent (MediaSession &mediaSession) : mediaSession(mediaSession) {} bool candidatesGathered () const; void checkSession (IceRole role, bool isReinvite); diff --git a/src/utils/payload-type-handler.h b/src/utils/payload-type-handler.h index d52e849fa..f5e284fda 100644 --- a/src/utils/payload-type-handler.h +++ b/src/utils/payload-type-handler.h @@ -42,7 +42,7 @@ struct VbrCodecBitrate { class PayloadTypeHandler { public: - PayloadTypeHandler (LinphoneCore *core) : core(core) {} + explicit PayloadTypeHandler (LinphoneCore *core) : core(core) {} bctbx_list_t *makeCodecsList (SalStreamType type, int bandwidthLimit, int maxCodecs, const bctbx_list_t *previousList);