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
public:
MysqlCDriver(const Reference< css::lang::XMultiServiceFactory >& _rxFactory);
explicit MysqlCDriver(const Reference< css::lang::XMultiServiceFactory >& _rxFactory);
// OComponentHelper
void SAL_CALL disposing() SAL_OVERRIDE;
......
......@@ -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));
......
......@@ -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 )
{
......
......@@ -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
......
......@@ -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); }
};
......
......@@ -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
......
......@@ -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;
......
......@@ -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();
......
......@@ -31,7 +31,7 @@
class CClassFactory : public IClassFactory
{
public:
CClassFactory(const CLSID& clsid);
explicit CClassFactory(const CLSID& clsid);
virtual ~CClassFactory();
......
......@@ -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();
......
......@@ -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
......
......@@ -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)
......
......@@ -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
......
......@@ -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; }
};
......
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