summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2012-06-30 18:20:20 +0200
committerJulien Nabet <serval2412@yahoo.fr>2012-06-30 18:21:26 +0200
commit6b11a18071254a443c8fe7e7b0b1c95b0f9fd35e (patch)
tree88cced9ff3bb7a89aa3a76bbd54591994ed01cc7 /ucb
parent611334aa74f97768717376da637bea9baac015aa (diff)
Some cppcheck cleaning
Change-Id: I14cab3dfd26ac1568feef902b566873cecf049b9
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/ucp/cmis/cmis_content.cxx8
-rw-r--r--ucb/source/ucp/cmis/cmis_datasupplier.cxx2
-rw-r--r--ucb/source/ucp/ftp/ftpurl.cxx2
-rw-r--r--ucb/source/ucp/webdav/webdavcontent.cxx2
4 files changed, 7 insertions, 7 deletions
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
{