summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-01-08 09:56:18 +0000
committerCaolán McNamara <caolanm@redhat.com>2016-01-08 17:15:04 +0000
commit0aa5414015813eda46dbfd7c3bcf259485ac1968 (patch)
treeba552e8e27c00f0d2d49564ed3dd98b829b04186
parent13e0ec9f38736557d9b4737298ca9a858919e6e3 (diff)
cppcheck: noExplicitConstructor
Change-Id: If1ddb112c85f127295eb55566360b066e7173ba2 Reviewed-on: https://gerrit.libreoffice.org/21245 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--mysqlc/source/mysqlc_driver.hxx2
-rw-r--r--onlineupdate/source/update/updater/xpcom/glue/nsVersionComparator.h2
-rw-r--r--sal/osl/w32/path_helper.hxx2
-rw-r--r--sal/workben/clipboardwben/testcopy/XTDataObject.hxx4
-rw-r--r--shell/source/backends/wininetbe/wininetbackend.cxx2
-rw-r--r--shell/source/win32/SysShExec.hxx2
-rw-r--r--shell/source/win32/ooofilereader/autostyletag.hxx10
-rw-r--r--shell/source/win32/ooofilereader/simpletag.hxx2
-rw-r--r--shell/source/win32/shlxthandler/classfactory.hxx2
-rw-r--r--shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx2
-rw-r--r--shell/source/win32/zipfile/zipexcptn.hxx12
-rw-r--r--shell/source/win32/zipfile/zipfile.cxx2
-rw-r--r--ucb/source/core/ucbstore.cxx2
-rw-r--r--vcl/ios/iosinst.cxx5
14 files changed, 27 insertions, 24 deletions
diff --git a/mysqlc/source/mysqlc_driver.hxx b/mysqlc/source/mysqlc_driver.hxx
index 85f82d2d5b56..0d1f3a301388 100644
--- a/mysqlc/source/mysqlc_driver.hxx
+++ b/mysqlc/source/mysqlc_driver.hxx
@@ -76,7 +76,7 @@ namespace connectivity
public:
- MysqlCDriver(const Reference< css::lang::XMultiServiceFactory >& _rxFactory);
+ explicit MysqlCDriver(const Reference< css::lang::XMultiServiceFactory >& _rxFactory);
// OComponentHelper
void SAL_CALL disposing() SAL_OVERRIDE;
diff --git a/onlineupdate/source/update/updater/xpcom/glue/nsVersionComparator.h b/onlineupdate/source/update/updater/xpcom/glue/nsVersionComparator.h
index a54c7fdd10e2..8ece9408abab 100644
--- a/onlineupdate/source/update/updater/xpcom/glue/nsVersionComparator.h
+++ b/onlineupdate/source/update/updater/xpcom/glue/nsVersionComparator.h
@@ -123,7 +123,7 @@ private:
#ifdef WNT
struct VersionW
{
- VersionW(const wchar_t* aVersionStringW)
+ explicit VersionW(const wchar_t* aVersionStringW)
{
versionContentW =
reinterpret_cast<wchar_t*>(wcsdup(aVersionStringW));
diff --git a/sal/osl/w32/path_helper.hxx b/sal/osl/w32/path_helper.hxx
index 6f75fca3f94b..ee77791781c2 100644
--- a/sal/osl/w32/path_helper.hxx
+++ b/sal/osl/w32/path_helper.hxx
@@ -74,7 +74,7 @@ class LongPathBuffer
LongPathBuffer& operator=( const LongPathBuffer& );
public:
- LongPathBuffer( sal_uInt32 nCharNum )
+ explicit LongPathBuffer( sal_uInt32 nCharNum )
: m_pBuffer( reinterpret_cast<T*>( rtl_allocateMemory( nCharNum * sizeof( T ) ) ) )
, m_nCharNum( nCharNum )
{
diff --git a/sal/workben/clipboardwben/testcopy/XTDataObject.hxx b/sal/workben/clipboardwben/testcopy/XTDataObject.hxx
index f6eb975a1034..3b71d78d7adb 100644
--- a/sal/workben/clipboardwben/testcopy/XTDataObject.hxx
+++ b/sal/workben/clipboardwben/testcopy/XTDataObject.hxx
@@ -35,7 +35,7 @@ class EnumFormatEtc;
class CXTDataObject : public IDataObject
{
public:
- CXTDataObject( LONG nRefCntInitVal = 0);
+ explicit CXTDataObject(LONG nRefCntInitVal = 0);
~CXTDataObject( );
// ole interface implementation
@@ -80,7 +80,7 @@ private:
class CEnumFormatEtc : public IEnumFORMATETC
{
public:
- CEnumFormatEtc( LPUNKNOWN pUnkDataObj );
+ explicit CEnumFormatEtc(LPUNKNOWN pUnkDataObj);
~CEnumFormatEtc( );
// IUnknown
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<std::string, bool>
{
- stricmp(const std::string &str) : str_(str)
+ explicit stricmp(const std::string &str) : str_(str)
{}
bool operator() (const std::string &other)
diff --git a/ucb/source/core/ucbstore.cxx b/ucb/source/core/ucbstore.cxx
index 00eee8f87ca4..2d88f2cff660 100644
--- a/ucb/source/core/ucbstore.cxx
+++ b/ucb/source/core/ucbstore.cxx
@@ -115,7 +115,7 @@ class PropertySetInfo_Impl : public cppu::WeakImplHelper < XPropertySetInfo >
PersistentPropertySet* m_pOwner;
public:
- PropertySetInfo_Impl( PersistentPropertySet* pOwner );
+ explicit PropertySetInfo_Impl(PersistentPropertySet* pOwner);
virtual ~PropertySetInfo_Impl();
// XPropertySetInfo
diff --git a/vcl/ios/iosinst.cxx b/vcl/ios/iosinst.cxx
index 8a0e24961b9a..7bfb37e2226e 100644
--- a/vcl/ios/iosinst.cxx
+++ b/vcl/ios/iosinst.cxx
@@ -36,7 +36,10 @@ static int viewWidth = 1, viewHeight = 1;
class IosSalData : public SalGenericData
{
public:
- IosSalData( SalInstance *pInstance ) : SalGenericData( SAL_DATA_IOS, pInstance ) {}
+ explicit IosSalData(SalInstance *pInstance)
+ : SalGenericData(SAL_DATA_IOS, pInstance)
+ {
+ }
virtual void ErrorTrapPush() {}
virtual bool ErrorTrapPop( bool ) { return false; }
};