From 6b11a18071254a443c8fe7e7b0b1c95b0f9fd35e Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Sat, 30 Jun 2012 18:20:20 +0200 Subject: Some cppcheck cleaning Change-Id: I14cab3dfd26ac1568feef902b566873cecf049b9 --- ucb/source/ucp/cmis/cmis_content.cxx | 8 ++++---- ucb/source/ucp/cmis/cmis_datasupplier.cxx | 2 +- ucb/source/ucp/ftp/ftpurl.cxx | 2 +- ucb/source/ucp/webdav/webdavcontent.cxx | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'ucb/source') diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx index 43cb6829dd50..039181365b32 100644 --- a/ucb/source/ucp/cmis/cmis_content.cxx +++ b/ucb/source/ucp/cmis/cmis_content.cxx @@ -317,13 +317,13 @@ namespace cmis } catch ( const libcmis::Exception& ) { - if ( m_pObjectProps.size() > 0 ) + if ( !m_pObjectProps.empty() ) { map< string, libcmis::PropertyPtr >::iterator it = m_pObjectProps.find( "cmis:name" ); if ( it != m_pObjectProps.end( ) ) { vector< string > values = it->second->getStrings( ); - if ( values.size() > 0 ) + if ( !values.empty() ) sTitle = STD_TO_OUSTR( values.front( ) ); } } @@ -355,7 +355,7 @@ namespace cmis try { vector< string > paths = getObject( )->getPaths( ); - if ( paths.size( ) > 0 ) + if ( !paths.empty( ) ) path = paths.front( ); else path = getObject()->getName( ); @@ -921,7 +921,7 @@ namespace cmis if ( NULL != document ) { vector< boost::shared_ptr< libcmis::Folder > > parents = document->getParents( ); - if ( parents.size( ) > 0 ) + if ( !parents.empty( ) ) parentPath = parents.front( )->getPath( ); } else diff --git a/ucb/source/ucp/cmis/cmis_datasupplier.cxx b/ucb/source/ucp/cmis/cmis_datasupplier.cxx index edddc9e8e3b9..710f82a0824a 100644 --- a/ucb/source/ucp/cmis/cmis_datasupplier.cxx +++ b/ucb/source/ucp/cmis/cmis_datasupplier.cxx @@ -94,7 +94,7 @@ namespace cmis { string sObjectPath; vector< string > paths = maResults[nIndex]->pObject->getPaths( ); - if ( paths.size( ) > 0 ) + if ( !paths.empty( ) ) sObjectPath = paths.front( ); // TODO Handle the unfiled objects with their id... but can they manage to come here? diff --git a/ucb/source/ucp/ftp/ftpurl.cxx b/ucb/source/ucp/ftp/ftpurl.cxx index 39f2a65686fa..9840fa4d2a0c 100644 --- a/ucb/source/ucp/ftp/ftpurl.cxx +++ b/ucb/source/ucp/ftp/ftpurl.cxx @@ -215,7 +215,7 @@ void FTPURL::parse(const rtl::OUString& url) *p1 = 0; if(buffer[0]) { - if( strcmp(buffer,"..") == 0 && m_aPathSegmentVec.size() && m_aPathSegmentVec.back() != ".." ) + if( strcmp(buffer,"..") == 0 && !m_aPathSegmentVec.empty() && m_aPathSegmentVec.back() != ".." ) m_aPathSegmentVec.pop_back(); else if(strcmp(buffer,".") == 0) ; // Ignore diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx index 88e2d9b77d04..64a369a40548 100644 --- a/ucb/source/ucp/webdav/webdavcontent.cxx +++ b/ucb/source/ucp/webdav/webdavcontent.cxx @@ -1715,7 +1715,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( } } // for - if ( !bTransient && aProppatchValues.size() ) + if ( !bTransient && !aProppatchValues.empty() ) { try { -- cgit