diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-09-13 13:09:01 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-09-13 13:19:22 +0200 |
commit | 91dd2db17bd6cb9b357d1d69b187174e31eabef0 (patch) | |
tree | d634de3a1a6820904b5699c2136b79b1a5a807c7 /sal/qa | |
parent | 6f8ea7e89ea190b9462c945d55a3ad8777b2f3ef (diff) |
loplugin:override: No more need for the "MSVC dtor override" workaround
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark
overriding destructors as 'virtual'" appears to no longer be a problem with
MSVC 2013.
(The little change in the rewriting code of compilerplugins/clang/override.cxx
was necessary to prevent an endless loop when adding "override" to
OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager();
in chart2/source/inc/LifeTime.hxx, getting stuck in the leading
OOO_DLLPUBLIC_CHARTTOOLS macro. Can't remember what that
isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.)
Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
Diffstat (limited to 'sal/qa')
-rw-r--r-- | sal/qa/osl/condition/osl_Condition.cxx | 2 | ||||
-rw-r--r-- | sal/qa/osl/mutex/osl_Mutex.cxx | 18 | ||||
-rw-r--r-- | sal/qa/osl/pipe/osl_Pipe.cxx | 4 | ||||
-rw-r--r-- | sal/qa/osl/process/osl_Thread.cxx | 12 | ||||
-rw-r--r-- | sal/qa/rtl/doublelock/rtl_doublelocking.cxx | 2 |
5 files changed, 19 insertions, 19 deletions
diff --git a/sal/qa/osl/condition/osl_Condition.cxx b/sal/qa/osl/condition/osl_Condition.cxx index d13713ea652b..4c9f69b69efe 100644 --- a/sal/qa/osl/condition/osl_Condition.cxx +++ b/sal/qa/osl/condition/osl_Condition.cxx @@ -40,7 +40,7 @@ public: //get the Condition to operate ConditionThread( ::osl::Condition& Con, ConditionType tType): m_MyCon( Con ), m_MyType( tType ) { } - virtual ~ConditionThread( ) + virtual ~ConditionThread( ) override { // LLA: do not throw in DTors! // LLA: CPPUNIT_ASSERT_MESSAGE( "#ConditionThread does not shutdown properly.\n", sal_False == this -> isRunning( ) ); diff --git a/sal/qa/osl/mutex/osl_Mutex.cxx b/sal/qa/osl/mutex/osl_Mutex.cxx index 83c1b6872cdf..c6e07b9cce80 100644 --- a/sal/qa/osl/mutex/osl_Mutex.cxx +++ b/sal/qa/osl/mutex/osl_Mutex.cxx @@ -67,7 +67,7 @@ class IncreaseThread : public Thread public: explicit IncreaseThread( struct resource *pData ): pResource( pData ) { } - virtual ~IncreaseThread( ) + virtual ~IncreaseThread( ) override { CPPUNIT_ASSERT_MESSAGE( "#IncreaseThread does not shutdown properly.\n", !isRunning( ) ); } @@ -95,7 +95,7 @@ class DecreaseThread : public Thread public: explicit DecreaseThread( struct resource *pData ): pResource( pData ) { } - virtual ~DecreaseThread( ) + virtual ~DecreaseThread( ) override { CPPUNIT_ASSERT_MESSAGE( "#DecreaseThread does not shutdown properly.\n", !isRunning( ) ); } @@ -132,7 +132,7 @@ public: //get the struct pointer to write data to buffer explicit PutThread( struct chain* pData ): pChain( pData ) { } - virtual ~PutThread( ) + virtual ~PutThread( ) override { CPPUNIT_ASSERT_MESSAGE( "#PutThread does not shutdown properly.\n", !isRunning( ) ); } @@ -170,7 +170,7 @@ public: //get the Mutex pointer to operate explicit HoldThread( Mutex* pMutex ): pMyMutex( pMutex ) { } - virtual ~HoldThread( ) + virtual ~HoldThread( ) override { CPPUNIT_ASSERT_MESSAGE( "#HoldThread does not shutdown properly.\n", !isRunning( ) ); } @@ -192,7 +192,7 @@ public: //get the Mutex pointer to operate explicit WaitThread( Mutex* pMutex ): pMyMutex( pMutex ) { } - virtual ~WaitThread( ) + virtual ~WaitThread( ) override { CPPUNIT_ASSERT_MESSAGE( "#WaitThread does not shutdown properly.\n", !isRunning( ) ); } @@ -216,7 +216,7 @@ public: //get the Mutex pointer to operate GlobalMutexThread( ){ } - virtual ~GlobalMutexThread( ) + virtual ~GlobalMutexThread( ) override { CPPUNIT_ASSERT_MESSAGE( "#GlobalMutexThread does not shutdown properly.\n", !isRunning( ) ); } @@ -523,7 +523,7 @@ public: //get the Mutex pointer to operate explicit GuardThread( Mutex* pMutex ): pMyMutex( pMutex ) { } - virtual ~GuardThread( ) + virtual ~GuardThread( ) override { CPPUNIT_ASSERT_MESSAGE( "#GuardThread does not shutdown properly.\n", !isRunning( ) ); } @@ -604,7 +604,7 @@ public: //get the Mutex pointer to operate explicit ClearGuardThread( Mutex* pMutex ): pMyMutex( pMutex ) {} - virtual ~ClearGuardThread( ) + virtual ~ClearGuardThread( ) override { CPPUNIT_ASSERT_MESSAGE( "#ClearGuardThread does not shutdown properly.\n", !isRunning( ) ); } @@ -741,7 +741,7 @@ public: //get the Mutex pointer to operate explicit ResetGuardThread( Mutex* pMutex ): pMyMutex( pMutex ) {} - virtual ~ResetGuardThread( ) + virtual ~ResetGuardThread( ) override { CPPUNIT_ASSERT_MESSAGE( "#ResetGuardThread does not shutdown properly.\n", !isRunning( ) ); } diff --git a/sal/qa/osl/pipe/osl_Pipe.cxx b/sal/qa/osl/pipe/osl_Pipe.cxx index f0ccc9b68772..d3510e16c9f1 100644 --- a/sal/qa/osl/pipe/osl_Pipe.cxx +++ b/sal/qa/osl/pipe/osl_Pipe.cxx @@ -736,7 +736,7 @@ namespace osl_StreamPipe sal_Char buf[256]; Pipe_DataSink_Thread( ) { } - virtual ~Pipe_DataSink_Thread( ) + virtual ~Pipe_DataSink_Thread( ) override { } protected: @@ -782,7 +782,7 @@ namespace osl_StreamPipe printf("create pipe\n"); aListenPipe.create( test::uniquePipeName(aTestPipeName), osl_Pipe_CREATE ); } - virtual ~Pipe_DataSource_Thread( ) + virtual ~Pipe_DataSource_Thread( ) override { aListenPipe.close(); } diff --git a/sal/qa/osl/process/osl_Thread.cxx b/sal/qa/osl/process/osl_Thread.cxx index ebce318f11c4..8f42ae4080e5 100644 --- a/sal/qa/osl/process/osl_Thread.cxx +++ b/sal/qa/osl/process/osl_Thread.cxx @@ -253,7 +253,7 @@ public: m_aFlag.release(); } - virtual ~myThread() + virtual ~myThread() override { if (isRunning()) { @@ -317,7 +317,7 @@ protected: } public: - virtual ~OCountThread() + virtual ~OCountThread() override { if (isRunning()) { @@ -359,7 +359,7 @@ public: { t_print("new thread id %u!\n", (unsigned) getIdentifier()); } - virtual ~ONoScheduleThread() + virtual ~ONoScheduleThread() override { if (isRunning()) { @@ -400,7 +400,7 @@ protected: } public: - virtual ~OAddThread() + virtual ~OAddThread() override { if (isRunning()) { @@ -1677,7 +1677,7 @@ private: ThreadHelper::thread_sleep_tenth_sec(3); } public: - virtual ~myKeyThread() + virtual ~myKeyThread() override { if (isRunning()) { @@ -1705,7 +1705,7 @@ private: } public: - virtual ~idThread() + virtual ~idThread() override { if (isRunning()) { diff --git a/sal/qa/rtl/doublelock/rtl_doublelocking.cxx b/sal/qa/rtl/doublelock/rtl_doublelocking.cxx index e4469fb6ffe9..910455b79ae2 100644 --- a/sal/qa/rtl/doublelock/rtl_doublelocking.cxx +++ b/sal/qa/rtl/doublelock/rtl_doublelocking.cxx @@ -125,7 +125,7 @@ protected: public: - virtual ~OGetThread() + virtual ~OGetThread() override { if (isRunning()) { |