From 0aa5414015813eda46dbfd7c3bcf259485ac1968 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 8 Jan 2016 09:56:18 +0000 Subject: cppcheck: noExplicitConstructor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: If1ddb112c85f127295eb55566360b066e7173ba2 Reviewed-on: https://gerrit.libreoffice.org/21245 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- shell/source/backends/wininetbe/wininetbackend.cxx | 2 +- shell/source/win32/SysShExec.hxx | 2 +- shell/source/win32/ooofilereader/autostyletag.hxx | 10 +++++----- shell/source/win32/ooofilereader/simpletag.hxx | 2 +- shell/source/win32/shlxthandler/classfactory.hxx | 2 +- shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx | 2 +- shell/source/win32/zipfile/zipexcptn.hxx | 12 ++++++------ shell/source/win32/zipfile/zipfile.cxx | 2 +- 8 files changed, 17 insertions(+), 17 deletions(-) (limited to 'shell') diff --git a/shell/source/backends/wininetbe/wininetbackend.cxx b/shell/source/backends/wininetbe/wininetbackend.cxx index e08fc29536af..1069b643bdf9 100644 --- a/shell/source/backends/wininetbe/wininetbackend.cxx +++ b/shell/source/backends/wininetbe/wininetbackend.cxx @@ -43,7 +43,7 @@ namespace { struct Library { HMODULE module; - Library(HMODULE theModule): module(theModule) {} + explicit Library(HMODULE theModule): module(theModule) {} ~Library() { if (module) FreeLibrary(module); } }; diff --git a/shell/source/win32/SysShExec.hxx b/shell/source/win32/SysShExec.hxx index 05c78fda0a5e..04141391fbe4 100644 --- a/shell/source/win32/SysShExec.hxx +++ b/shell/source/win32/SysShExec.hxx @@ -46,7 +46,7 @@ class CSysShExec : css::uno::Reference< css::uno::XComponentContext > m_xContext; public: - CSysShExec(const css::uno::Reference< css::uno::XComponentContext >& xContext); + explicit CSysShExec(const css::uno::Reference< css::uno::XComponentContext >& xContext); // XSystemShellExecute diff --git a/shell/source/win32/ooofilereader/autostyletag.hxx b/shell/source/win32/ooofilereader/autostyletag.hxx index 34c563f44635..9a86c1943efe 100644 --- a/shell/source/win32/ooofilereader/autostyletag.hxx +++ b/shell/source/win32/ooofilereader/autostyletag.hxx @@ -37,25 +37,25 @@ class CAutoStyleTag : public ITag { public: - CAutoStyleTag():m_CurrentStyleLocalePair( EMPTY_STYLELOCALE_PAIR ){}; - CAutoStyleTag( const XmlTagAttributes_t& attributes ); + CAutoStyleTag():m_CurrentStyleLocalePair( EMPTY_STYLELOCALE_PAIR ){} + explicit CAutoStyleTag(const XmlTagAttributes_t& attributes); virtual void startTag(); virtual void endTag(); virtual void addCharacters(const std::wstring& characters); virtual void addAttributes(const XmlTagAttributes_t& attributes); virtual std::wstring getTagContent(){ return EMPTY_STRING; }; - virtual ::std::wstring const getTagAttribute( ::std::wstring const & /*attrname*/ ){ return ::std::wstring() ; }; + virtual ::std::wstring const getTagAttribute( ::std::wstring const & /*attrname*/ ){ return ::std::wstring() ; } void setStyle( ::std::wstring const & Style ); void setLocale(const LocaleSet_t& Locale); void clearStyleLocalePair(); - inline StyleLocalePair_t getStyleLocalePair() const{ return m_CurrentStyleLocalePair; }; + inline StyleLocalePair_t getStyleLocalePair() const{ return m_CurrentStyleLocalePair; } inline bool isFull() const { return (( m_CurrentStyleLocalePair.first != EMPTY_STRING )&& ( m_CurrentStyleLocalePair.second != EMPTY_LOCALE)); - }; + } private: StyleLocalePair_t m_CurrentStyleLocalePair; diff --git a/shell/source/win32/ooofilereader/simpletag.hxx b/shell/source/win32/ooofilereader/simpletag.hxx index 0295b8ea4e98..1310bd1045b5 100644 --- a/shell/source/win32/ooofilereader/simpletag.hxx +++ b/shell/source/win32/ooofilereader/simpletag.hxx @@ -32,7 +32,7 @@ class CSimpleTag : public ITag { public: CSimpleTag(){}; - CSimpleTag( const XmlTagAttributes_t& attributes ):m_SimpleAttributes(attributes){}; + explicit CSimpleTag( const XmlTagAttributes_t& attributes ):m_SimpleAttributes(attributes){} virtual void startTag(); virtual void endTag(); diff --git a/shell/source/win32/shlxthandler/classfactory.hxx b/shell/source/win32/shlxthandler/classfactory.hxx index 131c8e01d17d..047b661ab5e9 100644 --- a/shell/source/win32/shlxthandler/classfactory.hxx +++ b/shell/source/win32/shlxthandler/classfactory.hxx @@ -31,7 +31,7 @@ class CClassFactory : public IClassFactory { public: - CClassFactory(const CLSID& clsid); + explicit CClassFactory(const CLSID& clsid); virtual ~CClassFactory(); diff --git a/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx b/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx index 8d929e87e1e5..a1eb85fbebda 100644 --- a/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx +++ b/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx @@ -120,7 +120,7 @@ namespace internal class StreamOnZipBuffer final : public IStream { public: - StreamOnZipBuffer(const ZipFile::ZipContentBuffer_t& zip_buffer); + explicit StreamOnZipBuffer(const ZipFile::ZipContentBuffer_t& zip_buffer); // IUnknown virtual ULONG STDMETHODCALLTYPE AddRef(); diff --git a/shell/source/win32/zipfile/zipexcptn.hxx b/shell/source/win32/zipfile/zipexcptn.hxx index 53159ff15929..ca7048911ce2 100644 --- a/shell/source/win32/zipfile/zipexcptn.hxx +++ b/shell/source/win32/zipfile/zipexcptn.hxx @@ -30,7 +30,7 @@ class RuntimeException : public std::exception { public: - RuntimeException(int Error); + explicit RuntimeException(int Error); virtual ~RuntimeException() throw(); int GetErrorCode() const; @@ -45,7 +45,7 @@ private: class ZipException : public RuntimeException { public: - ZipException(int Error); + explicit ZipException(int Error); virtual const char* what() const throw(); }; @@ -56,7 +56,7 @@ public: class Win32Exception : public RuntimeException { public: - Win32Exception(int Error); + explicit Win32Exception(int Error); virtual ~Win32Exception() throw(); virtual const char* what() const throw(); @@ -71,7 +71,7 @@ private: class ZipContentMissException : public ZipException { public: - ZipContentMissException(int Error); + explicit ZipContentMissException(int Error); }; @@ -80,7 +80,7 @@ public: class AccessViolationException : public Win32Exception { public: - AccessViolationException(int Error); + explicit AccessViolationException(int Error); }; @@ -89,7 +89,7 @@ public: class IOException : public Win32Exception { public: - IOException(int Error); + explicit IOException(int Error); }; #endif diff --git a/shell/source/win32/zipfile/zipfile.cxx b/shell/source/win32/zipfile/zipfile.cxx index 9cebf36ead13..c8228016c413 100644 --- a/shell/source/win32/zipfile/zipfile.cxx +++ b/shell/source/win32/zipfile/zipfile.cxx @@ -331,7 +331,7 @@ namespace internal /* for case in-sensitive string comparison */ struct stricmp : public std::unary_function { - stricmp(const std::string &str) : str_(str) + explicit stricmp(const std::string &str) : str_(str) {} bool operator() (const std::string &other) -- cgit