From 2c1b7e8d6a7fa22cb91919238418816671c3a497 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 19 Oct 2018 08:12:17 +0200 Subject: clang-tidy readability-container-size-empty Change-Id: I1df70b7dff5ebb6048f7fc618789faa15ca5d422 Reviewed-on: https://gerrit.libreoffice.org/61967 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sdext/source/minimizer/impoptimizer.cxx | 2 +- sdext/source/pdfimport/pdfparse/pdfentries.cxx | 2 +- sdext/source/presenter/PresenterTextView.cxx | 2 +- sdext/source/presenter/PresenterTimer.cxx | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'sdext') diff --git a/sdext/source/minimizer/impoptimizer.cxx b/sdext/source/minimizer/impoptimizer.cxx index 15de3f86a8ab..b1559d9500e5 100644 --- a/sdext/source/minimizer/impoptimizer.cxx +++ b/sdext/source/minimizer/impoptimizer.cxx @@ -386,7 +386,7 @@ static void CompressGraphics( ImpOptimizer& rOptimizer, const Reference< XCompon rOptimizer.SetStatusValue( TK_Progress, Any( nProgress ) ); rOptimizer.DispatchStatus(); - if ( aGraphicIter->maUser.size() ) + if ( !aGraphicIter->maUser.empty() ) { GraphicSettings aGraphicSettings( rGraphicSettings ); aGraphicSettings.mbRemoveCropArea = aGraphicIter->mbRemoveCropArea; diff --git a/sdext/source/pdfimport/pdfparse/pdfentries.cxx b/sdext/source/pdfimport/pdfparse/pdfentries.cxx index 5fed8e18d102..c5e2c4203d8f 100644 --- a/sdext/source/pdfimport/pdfparse/pdfentries.cxx +++ b/sdext/source/pdfimport/pdfparse/pdfentries.cxx @@ -1285,7 +1285,7 @@ PDFFileImplData* PDFFile::impl_getData() const if( doc_id != pTrailer->m_pDict->m_aMap.end() ) { PDFArray* pArr = dynamic_cast(doc_id->second); - if( pArr && pArr->m_aSubElements.size() > 0 ) + if( pArr && !pArr->m_aSubElements.empty() ) { PDFString* pStr = dynamic_cast(pArr->m_aSubElements[0].get()); if( pStr ) diff --git a/sdext/source/presenter/PresenterTextView.cxx b/sdext/source/presenter/PresenterTextView.cxx index 3583438bcd81..731aee81e911 100644 --- a/sdext/source/presenter/PresenterTextView.cxx +++ b/sdext/source/presenter/PresenterTextView.cxx @@ -725,7 +725,7 @@ void PresenterTextParagraph::AddLine ( Line aLine (rCurrentLine.startPos, rCurrentLine.endPos); // Find the start and end of the line with respect to cells. - if (maLines.size() > 0) + if (!maLines.empty()) { aLine.mnLineStartCellIndex = maLines.back().mnLineEndCellIndex; aLine.mnBaseLine = maLines.back().mnBaseLine + mnLineHeight; diff --git a/sdext/source/presenter/PresenterTimer.cxx b/sdext/source/presenter/PresenterTimer.cxx index 916b6bf168e6..d63ebd8068a9 100644 --- a/sdext/source/presenter/PresenterTimer.cxx +++ b/sdext/source/presenter/PresenterTimer.cxx @@ -577,7 +577,7 @@ void SAL_CALL PresenterClockTimer::notify (const css::uno::Any&) ::std::back_inserter(aListenerCopy)); } - if (aListenerCopy.size() > 0) + if (!aListenerCopy.empty()) { ListenerContainer::const_iterator iListener; ListenerContainer::const_iterator iEnd (aListenerCopy.end()); -- cgit