From f078fff437af05dd7b5b1fd178d1e5cbc064f8e1 Mon Sep 17 00:00:00 2001 From: kfb77 Date: Sun, 9 Aug 2020 17:29:54 +0200 Subject: [PATCH] fix constructor with argument that is not explicit --- epgsearch/services.h | 2 +- exception.h | 2 +- osd_status.h | 2 +- tools.cpp | 2 +- tools.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/epgsearch/services.h b/epgsearch/services.h index 9136c512..ecea1276 100644 --- a/epgsearch/services.h +++ b/epgsearch/services.h @@ -107,7 +107,7 @@ struct Epgsearch_searchresults_v1_0 { public: const cEvent* event; - cServiceSearchResult(const cEvent* Event) : event(Event) {} + explicit cServiceSearchResult(const cEvent* Event) : event(Event) {} }; cList* pResultList; // pointer to the results diff --git a/exception.h b/exception.h index da30dc78..b49906a0 100644 --- a/exception.h +++ b/exception.h @@ -8,7 +8,7 @@ namespace vdrlive { class HtmlError: public std::runtime_error { public: - HtmlError( std::string const& message ): std::runtime_error( message ) {} + explicit HtmlError( std::string const& message ): std::runtime_error( message ) {} virtual ~HtmlError() throw() {} }; diff --git a/osd_status.h b/osd_status.h index 3c86d453..3a5efe97 100644 --- a/osd_status.h +++ b/osd_status.h @@ -18,7 +18,7 @@ class cLiveOsdItem: public cListObject { int isSelected() const {return selected;} void Select(const bool doSelect) { selected= doSelect; }; void Update(const char* Text) { text = Text ? Text : ""; }; - cLiveOsdItem(const char* Text):text(),selected(false) { text = Text ? Text : ""; }; + explicit cLiveOsdItem(const char* Text):text(),selected(false) { text = Text ? Text : ""; }; ~cLiveOsdItem() { } }; diff --git a/tools.cpp b/tools.cpp index 779fa2d2..cb3f940c 100644 --- a/tools.cpp +++ b/tools.cpp @@ -232,7 +232,7 @@ namespace vdrlive { { ostream& ostr_; - urlencoder( ostream& ostr ): ostr_( ostr ) {} + explicit urlencoder( ostream& ostr ): ostr_( ostr ) {} void operator()( char ch ) { diff --git a/tools.h b/tools.h index 40a47ec0..46c676bd 100644 --- a/tools.h +++ b/tools.h @@ -96,7 +96,7 @@ namespace vdrlive { typedef void (ReadLock::*safe_bool)() const; public: - ReadLock(cRwLock& lock, int timeout = 100) + explicit ReadLock(cRwLock& lock, int timeout = 100) : m_lock(lock) , m_locked(false) {