diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-11-24 10:09:57 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-11-24 10:35:44 +0000 |
commit | 70b09d932225027d531c9a95317320174f8ad687 (patch) | |
tree | ec36c7d4927721c59d22830385517770e820d98b /sal | |
parent | cbc5dc14d6bb795a9c2b54d624b10770a2a95a00 (diff) |
cppcheck: noExplicitConstructor
Change-Id: I1934441858baeeb41a46f694dbcef2d846b308b7
Diffstat (limited to 'sal')
-rw-r--r-- | sal/qa/osl/mutex/osl_Mutex.cxx | 16 | ||||
-rw-r--r-- | sal/qa/osl/process/osl_Thread.cxx | 4 |
2 files changed, 10 insertions, 10 deletions
diff --git a/sal/qa/osl/mutex/osl_Mutex.cxx b/sal/qa/osl/mutex/osl_Mutex.cxx index 106dbc6ea903..67924d245df3 100644 --- a/sal/qa/osl/mutex/osl_Mutex.cxx +++ b/sal/qa/osl/mutex/osl_Mutex.cxx @@ -65,7 +65,7 @@ struct resource { class IncreaseThread : public Thread { public: - IncreaseThread( struct resource *pData ): pResource( pData ) { } + explicit IncreaseThread( struct resource *pData ): pResource( pData ) { } virtual ~IncreaseThread( ) { @@ -93,7 +93,7 @@ protected: class DecreaseThread : public Thread { public: - DecreaseThread( struct resource *pData ): pResource( pData ) { } + explicit DecreaseThread( struct resource *pData ): pResource( pData ) { } virtual ~DecreaseThread( ) { @@ -130,7 +130,7 @@ class PutThread : public Thread { public: //get the struct pointer to write data to buffer - PutThread( struct chain* pData ): pChain( pData ) { } + explicit PutThread( struct chain* pData ): pChain( pData ) { } virtual ~PutThread( ) { @@ -168,7 +168,7 @@ class HoldThread : public Thread { public: //get the Mutex pointer to operate - HoldThread( Mutex* pMutex ): pMyMutex( pMutex ) { } + explicit HoldThread( Mutex* pMutex ): pMyMutex( pMutex ) { } virtual ~HoldThread( ) { @@ -190,7 +190,7 @@ class WaitThread : public Thread { public: //get the Mutex pointer to operate - WaitThread( Mutex* pMutex ): pMyMutex( pMutex ) { } + explicit WaitThread( Mutex* pMutex ): pMyMutex( pMutex ) { } virtual ~WaitThread( ) { @@ -525,7 +525,7 @@ class GuardThread : public Thread { public: //get the Mutex pointer to operate - GuardThread( Mutex* pMutex ): pMyMutex( pMutex ) { } + explicit GuardThread( Mutex* pMutex ): pMyMutex( pMutex ) { } virtual ~GuardThread( ) { @@ -606,7 +606,7 @@ class ClearGuardThread : public Thread { public: //get the Mutex pointer to operate - ClearGuardThread( Mutex* pMutex ): pMyMutex( pMutex ) {} + explicit ClearGuardThread( Mutex* pMutex ): pMyMutex( pMutex ) {} virtual ~ClearGuardThread( ) { @@ -743,7 +743,7 @@ class ResetGuardThread : public Thread { public: //get the Mutex pointer to operate - ResetGuardThread( Mutex* pMutex ): pMyMutex( pMutex ) {} + explicit ResetGuardThread( Mutex* pMutex ): pMyMutex( pMutex ) {} virtual ~ResetGuardThread( ) { diff --git a/sal/qa/osl/process/osl_Thread.cxx b/sal/qa/osl/process/osl_Thread.cxx index 63207f9b1e56..29687f8c938b 100644 --- a/sal/qa/osl/process/osl_Thread.cxx +++ b/sal/qa/osl/process/osl_Thread.cxx @@ -160,7 +160,7 @@ class ThreadSafeValue T m_nFlag; Mutex m_aMutex; public: - ThreadSafeValue(T n = 0): m_nFlag(n) {} + explicit ThreadSafeValue(T n = 0): m_nFlag(n) {} T getValue() { //block if already acquired by another thread. @@ -1749,7 +1749,7 @@ public: // a public char member for test result checking char m_Char_Test; // for pass thread-special data to thread - myKeyThread(const char cData) + explicit myKeyThread(const char cData) : m_Char_Test(0) { m_nData = cData; |