diff options
author | Kayo Hamid <kayo.hamid@gekkolinux.com.br> | 2011-04-22 23:41:55 -0400 |
---|---|---|
committer | Michael Meeks <michael.meeks@novell.com> | 2011-04-26 15:24:32 +0100 |
commit | d933b2a6f56f450f4b21c3a6a0d083258b3a7d1d (patch) | |
tree | a619cd08e4b1f35a20b1239a6e0a3d1969fd3d01 | |
parent | a841eeba0a002cc237d0814104a518d0c47e8f1a (diff) |
inefficient emptiness check
-rw-r--r-- | sdext/source/minimizer/pagecollector.cxx | 2 | ||||
-rw-r--r-- | sdext/source/pdfimport/tree/pdfiprocessor.cxx | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sdext/source/minimizer/pagecollector.cxx b/sdext/source/minimizer/pagecollector.cxx index ae1a639..e286737 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 806f24a..217e26a 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, |