From 5dd4f9ecb2f50cf76b44472e4438297b6c65184c Mon Sep 17 00:00:00 2001 From: Kayo Hamid Date: Fri, 22 Apr 2011 23:41:55 -0400 Subject: inefficient emptiness check --- sdext/source/minimizer/pagecollector.cxx | 2 +- sdext/source/pdfimport/tree/pdfiprocessor.cxx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'sdext') diff --git a/sdext/source/minimizer/pagecollector.cxx b/sdext/source/minimizer/pagecollector.cxx index 101582c9983a..811d63f8b96c 100644 --- a/sdext/source/minimizer/pagecollector.cxx +++ b/sdext/source/minimizer/pagecollector.cxx @@ -96,7 +96,7 @@ void PageCollector::CollectNonCustomShowPages( const com::sun::star::uno::Refere { std::vector< Reference< XDrawPage > > vUsedPageList; PageCollector::CollectCustomShowPages( rxModel, rCustomShowName, vUsedPageList ); - if ( vUsedPageList.size() ) + if ( !vUsedPageList.empty() ) { Reference< XDrawPagesSupplier > xDrawPagesSupplier( rxModel, UNO_QUERY_THROW ); Reference< XDrawPages > xDrawPages( xDrawPagesSupplier->getDrawPages(), UNO_QUERY_THROW ); diff --git a/sdext/source/pdfimport/tree/pdfiprocessor.cxx b/sdext/source/pdfimport/tree/pdfiprocessor.cxx index 238f78c8f647..ffc905df7c84 100644 --- a/sdext/source/pdfimport/tree/pdfiprocessor.cxx +++ b/sdext/source/pdfimport/tree/pdfiprocessor.cxx @@ -221,7 +221,7 @@ sal_Int32 PDFIProcessor::getFontId( const FontAttributes& rAttr ) const // line diagnose block - start void PDFIProcessor::processGlyphLine() { - if( m_GlyphsList.size()<1 ) + if( m_GlyphsList.empty() ) return; double fPreAvarageSpaceValue= 0.0; @@ -317,7 +317,7 @@ void PDFIProcessor::processGlyphLine() ParagraphElement* pPara= NULL ; FrameElement* pFrame= NULL ; - if(m_GlyphsList.size()>0) + if(!m_GlyphsList.empty()) { pFrame = m_pElFactory->createFrameElement( m_GlyphsList[0].getCurElement(), getGCId( getTransformGlyphContext( m_GlyphsList[0])) ); pFrame->ZOrder = m_nNextZOrder++; @@ -401,7 +401,7 @@ void PDFIProcessor::processGlyphLine() } - if(m_GlyphsList.size()>1) + if(!m_GlyphsList.empty()) processGlyph( 0, m_GlyphsList[m_GlyphsList.size()-1], pPara, -- cgit