loplugin:virtualdead unused param in Task::UpdateMinPeriod

Change-Id: Ie24f56fed811b3b317d6c20e15289e7cecfb738d
Reviewed-on: https://gerrit.libreoffice.org/81157
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin 2019-10-17 16:17:45 +02:00
parent fb74f7b663
commit fec35bf15d
9 changed files with 9 additions and 16 deletions

View File

@ -211,9 +211,6 @@ include/vcl/ITiledRenderable.hxx:209
include/vcl/opengl/OpenGLContext.hxx:141 include/vcl/opengl/OpenGLContext.hxx:141
struct SystemWindowData OpenGLContext::generateWinData(class vcl::Window *,_Bool,) struct SystemWindowData OpenGLContext::generateWinData(class vcl::Window *,_Bool,)
10 10
include/vcl/task.hxx:71
unsigned long Task::UpdateMinPeriod(unsigned long,unsigned long,)const
01
include/xmloff/xmlimp.hxx:244 include/xmloff/xmlimp.hxx:244
class SvXMLImportContext * SvXMLImport::CreateDocumentContext(const unsigned short,const class rtl::OUString &,const class com::sun::star::uno::Reference<class com::sun::star::xml::sax::XAttributeList> &,) class SvXMLImportContext * SvXMLImport::CreateDocumentContext(const unsigned short,const class rtl::OUString &,const class com::sun::star::uno::Reference<class com::sun::star::xml::sax::XAttributeList> &,)
110 110

View File

@ -35,8 +35,7 @@ private:
sal_uInt64 GetTimeout() const = delete; sal_uInt64 GetTimeout() const = delete;
protected: protected:
virtual sal_uInt64 UpdateMinPeriod( virtual sal_uInt64 UpdateMinPeriod( sal_uInt64 nTimeNow ) const override;
sal_uInt64 nMinPeriod, sal_uInt64 nTimeNow ) const override;
Idle( bool bAuto, const sal_Char *pDebugName ); Idle( bool bAuto, const sal_Char *pDebugName );

View File

@ -64,11 +64,10 @@ protected:
* need another mechanism to wake up the Scheduler or rely on other * need another mechanism to wake up the Scheduler or rely on other
* Tasks to be scheduled, or simply use a polling Timer. * Tasks to be scheduled, or simply use a polling Timer.
* *
* @param nMinPeriod the currently expected sleep time
* @param nTimeNow the current time * @param nTimeNow the current time
* @return the sleep time of the Task to become ready * @return the sleep time of the Task to become ready
*/ */
virtual sal_uInt64 UpdateMinPeriod( sal_uInt64 nMinPeriod, sal_uInt64 nTimeNow ) const = 0; virtual sal_uInt64 UpdateMinPeriod( sal_uInt64 nTimeNow ) const = 0;
public: public:
Task( const sal_Char *pDebugName ); Task( const sal_Char *pDebugName );

View File

@ -31,8 +31,7 @@ class VCL_DLLPUBLIC Timer : public Task
protected: protected:
virtual void SetDeletionFlags() override; virtual void SetDeletionFlags() override;
virtual sal_uInt64 UpdateMinPeriod( virtual sal_uInt64 UpdateMinPeriod( sal_uInt64 nTimeNow ) const override;
sal_uInt64 nMinPeriod, sal_uInt64 nTimeNow ) const override;
Timer( bool bAuto, const sal_Char *pDebugName ); Timer( bool bAuto, const sal_Char *pDebugName );

View File

@ -39,8 +39,7 @@ private:
SwDoc &m_rDoc; SwDoc &m_rDoc;
protected: protected:
virtual sal_uInt64 UpdateMinPeriod( virtual sal_uInt64 UpdateMinPeriod( sal_uInt64 nTimeNow ) const override;
sal_uInt64 nMinPeriod, sal_uInt64 nTimeNow ) const override;
public: public:
SwDocIdle( SwDoc &doc ); SwDocIdle( SwDoc &doc );

View File

@ -30,7 +30,7 @@
namespace sw namespace sw
{ {
sal_uInt64 SwDocIdle::UpdateMinPeriod( sal_uInt64 /* nMinPeriod */, sal_uInt64 /* nTimeNow */ ) const sal_uInt64 SwDocIdle::UpdateMinPeriod( sal_uInt64 /* nTimeNow */ ) const
{ {
bool bReadyForSchedule = true; bool bReadyForSchedule = true;

View File

@ -52,7 +52,7 @@ void Idle::Start()
Task::StartTimer(nPeriod); Task::StartTimer(nPeriod);
} }
sal_uInt64 Idle::UpdateMinPeriod( sal_uInt64 /* nMinPeriod */, sal_uInt64 /* nTimeNow */ ) const sal_uInt64 Idle::UpdateMinPeriod( sal_uInt64 /* nTimeNow */ ) const
{ {
return Scheduler::ImmediateTimeoutMs; return Scheduler::ImmediateTimeoutMs;
} }

View File

@ -419,7 +419,7 @@ bool Scheduler::ProcessTaskScheduling()
assert(pSchedulerData->mpTask); assert(pSchedulerData->mpTask);
if (pSchedulerData->mpTask->IsActive()) if (pSchedulerData->mpTask->IsActive())
{ {
nReadyPeriod = pSchedulerData->mpTask->UpdateMinPeriod( nMinPeriod, nTime ); nReadyPeriod = pSchedulerData->mpTask->UpdateMinPeriod( nTime );
if (ImmediateTimeoutMs == nReadyPeriod) if (ImmediateTimeoutMs == nReadyPeriod)
{ {
if (!pMostUrgent) if (!pMostUrgent)
@ -523,7 +523,7 @@ bool Scheduler::ProcessTaskScheduling()
else if (bTaskAlive) else if (bTaskAlive)
{ {
pMostUrgent->mnUpdateTime = nTime; pMostUrgent->mnUpdateTime = nTime;
nReadyPeriod = pMostUrgent->mpTask->UpdateMinPeriod( nMinPeriod, nTime ); nReadyPeriod = pMostUrgent->mpTask->UpdateMinPeriod( nTime );
if ( nMinPeriod > nReadyPeriod ) if ( nMinPeriod > nReadyPeriod )
nMinPeriod = nReadyPeriod; nMinPeriod = nReadyPeriod;
UpdateSystemTimer( rSchedCtx, nMinPeriod, false, nTime ); UpdateSystemTimer( rSchedCtx, nMinPeriod, false, nTime );

View File

@ -29,7 +29,7 @@ void Timer::SetDeletionFlags()
Task::SetDeletionFlags(); Task::SetDeletionFlags();
} }
sal_uInt64 Timer::UpdateMinPeriod( sal_uInt64, sal_uInt64 nTimeNow ) const sal_uInt64 Timer::UpdateMinPeriod( sal_uInt64 nTimeNow ) const
{ {
sal_uInt64 nWakeupTime = GetSchedulerData()->mnUpdateTime + mnTimeout; sal_uInt64 nWakeupTime = GetSchedulerData()->mnUpdateTime + mnTimeout;
return ( nWakeupTime <= nTimeNow ) return ( nWakeupTime <= nTimeNow )