Kaydet (Commit) 0aa54140 authored tarafından Caolán McNamara's avatar Caolán McNamara

cppcheck: noExplicitConstructor

Change-Id: If1ddb112c85f127295eb55566360b066e7173ba2
Reviewed-on: https://gerrit.libreoffice.org/21245Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 13e0ec9f
...@@ -76,7 +76,7 @@ namespace connectivity ...@@ -76,7 +76,7 @@ namespace connectivity
public: public:
MysqlCDriver(const Reference< css::lang::XMultiServiceFactory >& _rxFactory); explicit MysqlCDriver(const Reference< css::lang::XMultiServiceFactory >& _rxFactory);
// OComponentHelper // OComponentHelper
void SAL_CALL disposing() SAL_OVERRIDE; void SAL_CALL disposing() SAL_OVERRIDE;
......
...@@ -123,7 +123,7 @@ private: ...@@ -123,7 +123,7 @@ private:
#ifdef WNT #ifdef WNT
struct VersionW struct VersionW
{ {
VersionW(const wchar_t* aVersionStringW) explicit VersionW(const wchar_t* aVersionStringW)
{ {
versionContentW = versionContentW =
reinterpret_cast<wchar_t*>(wcsdup(aVersionStringW)); reinterpret_cast<wchar_t*>(wcsdup(aVersionStringW));
......
...@@ -74,7 +74,7 @@ class LongPathBuffer ...@@ -74,7 +74,7 @@ class LongPathBuffer
LongPathBuffer& operator=( const LongPathBuffer& ); LongPathBuffer& operator=( const LongPathBuffer& );
public: public:
LongPathBuffer( sal_uInt32 nCharNum ) explicit LongPathBuffer( sal_uInt32 nCharNum )
: m_pBuffer( reinterpret_cast<T*>( rtl_allocateMemory( nCharNum * sizeof( T ) ) ) ) : m_pBuffer( reinterpret_cast<T*>( rtl_allocateMemory( nCharNum * sizeof( T ) ) ) )
, m_nCharNum( nCharNum ) , m_nCharNum( nCharNum )
{ {
......
...@@ -35,7 +35,7 @@ class EnumFormatEtc; ...@@ -35,7 +35,7 @@ class EnumFormatEtc;
class CXTDataObject : public IDataObject class CXTDataObject : public IDataObject
{ {
public: public:
CXTDataObject( LONG nRefCntInitVal = 0); explicit CXTDataObject(LONG nRefCntInitVal = 0);
~CXTDataObject( ); ~CXTDataObject( );
// ole interface implementation // ole interface implementation
...@@ -80,7 +80,7 @@ private: ...@@ -80,7 +80,7 @@ private:
class CEnumFormatEtc : public IEnumFORMATETC class CEnumFormatEtc : public IEnumFORMATETC
{ {
public: public:
CEnumFormatEtc( LPUNKNOWN pUnkDataObj ); explicit CEnumFormatEtc(LPUNKNOWN pUnkDataObj);
~CEnumFormatEtc( ); ~CEnumFormatEtc( );
// IUnknown // IUnknown
......
...@@ -43,7 +43,7 @@ namespace { ...@@ -43,7 +43,7 @@ namespace {
struct Library { struct Library {
HMODULE module; HMODULE module;
Library(HMODULE theModule): module(theModule) {} explicit Library(HMODULE theModule): module(theModule) {}
~Library() { if (module) FreeLibrary(module); } ~Library() { if (module) FreeLibrary(module); }
}; };
......
...@@ -46,7 +46,7 @@ class CSysShExec : ...@@ -46,7 +46,7 @@ class CSysShExec :
css::uno::Reference< css::uno::XComponentContext > m_xContext; css::uno::Reference< css::uno::XComponentContext > m_xContext;
public: public:
CSysShExec(const css::uno::Reference< css::uno::XComponentContext >& xContext); explicit CSysShExec(const css::uno::Reference< css::uno::XComponentContext >& xContext);
// XSystemShellExecute // XSystemShellExecute
......
...@@ -37,25 +37,25 @@ ...@@ -37,25 +37,25 @@
class CAutoStyleTag : public ITag class CAutoStyleTag : public ITag
{ {
public: public:
CAutoStyleTag():m_CurrentStyleLocalePair( EMPTY_STYLELOCALE_PAIR ){}; CAutoStyleTag():m_CurrentStyleLocalePair( EMPTY_STYLELOCALE_PAIR ){}
CAutoStyleTag( const XmlTagAttributes_t& attributes ); explicit CAutoStyleTag(const XmlTagAttributes_t& attributes);
virtual void startTag(); virtual void startTag();
virtual void endTag(); virtual void endTag();
virtual void addCharacters(const std::wstring& characters); virtual void addCharacters(const std::wstring& characters);
virtual void addAttributes(const XmlTagAttributes_t& attributes); virtual void addAttributes(const XmlTagAttributes_t& attributes);
virtual std::wstring getTagContent(){ return EMPTY_STRING; }; 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 setStyle( ::std::wstring const & Style );
void setLocale(const LocaleSet_t& Locale); void setLocale(const LocaleSet_t& Locale);
void clearStyleLocalePair(); void clearStyleLocalePair();
inline StyleLocalePair_t getStyleLocalePair() const{ return m_CurrentStyleLocalePair; }; inline StyleLocalePair_t getStyleLocalePair() const{ return m_CurrentStyleLocalePair; }
inline bool isFull() const inline bool isFull() const
{ {
return (( m_CurrentStyleLocalePair.first != EMPTY_STRING )&& return (( m_CurrentStyleLocalePair.first != EMPTY_STRING )&&
( m_CurrentStyleLocalePair.second != EMPTY_LOCALE)); ( m_CurrentStyleLocalePair.second != EMPTY_LOCALE));
}; }
private: private:
StyleLocalePair_t m_CurrentStyleLocalePair; StyleLocalePair_t m_CurrentStyleLocalePair;
......
...@@ -32,7 +32,7 @@ class CSimpleTag : public ITag ...@@ -32,7 +32,7 @@ class CSimpleTag : public ITag
{ {
public: public:
CSimpleTag(){}; CSimpleTag(){};
CSimpleTag( const XmlTagAttributes_t& attributes ):m_SimpleAttributes(attributes){}; explicit CSimpleTag( const XmlTagAttributes_t& attributes ):m_SimpleAttributes(attributes){}
virtual void startTag(); virtual void startTag();
virtual void endTag(); virtual void endTag();
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
class CClassFactory : public IClassFactory class CClassFactory : public IClassFactory
{ {
public: public:
CClassFactory(const CLSID& clsid); explicit CClassFactory(const CLSID& clsid);
virtual ~CClassFactory(); virtual ~CClassFactory();
......
...@@ -120,7 +120,7 @@ namespace internal ...@@ -120,7 +120,7 @@ namespace internal
class StreamOnZipBuffer final : public IStream class StreamOnZipBuffer final : public IStream
{ {
public: public:
StreamOnZipBuffer(const ZipFile::ZipContentBuffer_t& zip_buffer); explicit StreamOnZipBuffer(const ZipFile::ZipContentBuffer_t& zip_buffer);
// IUnknown // IUnknown
virtual ULONG STDMETHODCALLTYPE AddRef(); virtual ULONG STDMETHODCALLTYPE AddRef();
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
class RuntimeException : public std::exception class RuntimeException : public std::exception
{ {
public: public:
RuntimeException(int Error); explicit RuntimeException(int Error);
virtual ~RuntimeException() throw(); virtual ~RuntimeException() throw();
int GetErrorCode() const; int GetErrorCode() const;
...@@ -45,7 +45,7 @@ private: ...@@ -45,7 +45,7 @@ private:
class ZipException : public RuntimeException class ZipException : public RuntimeException
{ {
public: public:
ZipException(int Error); explicit ZipException(int Error);
virtual const char* what() const throw(); virtual const char* what() const throw();
}; };
...@@ -56,7 +56,7 @@ public: ...@@ -56,7 +56,7 @@ public:
class Win32Exception : public RuntimeException class Win32Exception : public RuntimeException
{ {
public: public:
Win32Exception(int Error); explicit Win32Exception(int Error);
virtual ~Win32Exception() throw(); virtual ~Win32Exception() throw();
virtual const char* what() const throw(); virtual const char* what() const throw();
...@@ -71,7 +71,7 @@ private: ...@@ -71,7 +71,7 @@ private:
class ZipContentMissException : public ZipException class ZipContentMissException : public ZipException
{ {
public: public:
ZipContentMissException(int Error); explicit ZipContentMissException(int Error);
}; };
...@@ -80,7 +80,7 @@ public: ...@@ -80,7 +80,7 @@ public:
class AccessViolationException : public Win32Exception class AccessViolationException : public Win32Exception
{ {
public: public:
AccessViolationException(int Error); explicit AccessViolationException(int Error);
}; };
...@@ -89,7 +89,7 @@ public: ...@@ -89,7 +89,7 @@ public:
class IOException : public Win32Exception class IOException : public Win32Exception
{ {
public: public:
IOException(int Error); explicit IOException(int Error);
}; };
#endif #endif
......
...@@ -331,7 +331,7 @@ namespace internal ...@@ -331,7 +331,7 @@ namespace internal
/* for case in-sensitive string comparison */ /* for case in-sensitive string comparison */
struct stricmp : public std::unary_function<std::string, bool> 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) bool operator() (const std::string &other)
......
...@@ -115,7 +115,7 @@ class PropertySetInfo_Impl : public cppu::WeakImplHelper < XPropertySetInfo > ...@@ -115,7 +115,7 @@ class PropertySetInfo_Impl : public cppu::WeakImplHelper < XPropertySetInfo >
PersistentPropertySet* m_pOwner; PersistentPropertySet* m_pOwner;
public: public:
PropertySetInfo_Impl( PersistentPropertySet* pOwner ); explicit PropertySetInfo_Impl(PersistentPropertySet* pOwner);
virtual ~PropertySetInfo_Impl(); virtual ~PropertySetInfo_Impl();
// XPropertySetInfo // XPropertySetInfo
......
...@@ -36,7 +36,10 @@ static int viewWidth = 1, viewHeight = 1; ...@@ -36,7 +36,10 @@ static int viewWidth = 1, viewHeight = 1;
class IosSalData : public SalGenericData class IosSalData : public SalGenericData
{ {
public: public:
IosSalData( SalInstance *pInstance ) : SalGenericData( SAL_DATA_IOS, pInstance ) {} explicit IosSalData(SalInstance *pInstance)
: SalGenericData(SAL_DATA_IOS, pInstance)
{
}
virtual void ErrorTrapPush() {} virtual void ErrorTrapPush() {}
virtual bool ErrorTrapPop( bool ) { return false; } virtual bool ErrorTrapPop( bool ) { return false; }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment