summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2011-07-31 00:02:18 +0200
committerJulien Nabet <serval2412@yahoo.fr>2011-07-31 00:02:18 +0200
commit61a718a36525dcc570be0fec8611c9106ed73208 (patch)
treebcaf0c77b72aa2ef83ae02b8dd13447e0315c27b
parent433b71d8eb3992a9f79a914a5b79dd4e8ace0f09 (diff)
Some cppcheck cleaning
-rw-r--r--ucb/source/cacher/cachedcontentresultset.cxx2
-rw-r--r--ucb/source/cacher/contentresultsetwrapper.cxx4
-rw-r--r--ucb/source/ucp/ftp/ftpurl.cxx6
-rw-r--r--ucb/source/ucp/webdav/DAVResourceAccess.cxx2
-rw-r--r--ucb/source/ucp/webdav/NeonLockStore.cxx2
-rwxr-xr-xucb/source/ucp/webdav/NeonSession.cxx2
-rw-r--r--ucb/source/ucp/webdav/webdavcontent.cxx6
-rw-r--r--vbahelper/source/msforms/vbacontrols.cxx2
-rw-r--r--vbahelper/source/vbahelper/vbadocumentsbase.cxx2
-rw-r--r--xmlhelp/source/cxxhelp/provider/databases.cxx2
10 files changed, 15 insertions, 15 deletions
diff --git a/ucb/source/cacher/cachedcontentresultset.cxx b/ucb/source/cacher/cachedcontentresultset.cxx
index 62e88b63c0..83d73d1bdf 100644
--- a/ucb/source/cacher/cachedcontentresultset.cxx
+++ b/ucb/source/cacher/cachedcontentresultset.cxx
@@ -809,7 +809,7 @@ sal_Bool SAL_CALL CachedContentResultSet
m_bAfterLastApplied = nRow != m_nLastAppliedPos;
}
else
- throw rEx;
+ throw;
}
return nRow == m_nLastAppliedPos;
diff --git a/ucb/source/cacher/contentresultsetwrapper.cxx b/ucb/source/cacher/contentresultsetwrapper.cxx
index 4be2b8e492..113d7cc4de 100644
--- a/ucb/source/cacher/contentresultsetwrapper.cxx
+++ b/ucb/source/cacher/contentresultsetwrapper.cxx
@@ -616,7 +616,7 @@ void SAL_CALL ContentResultSetWrapper
catch( Exception& rEx )
{
m_pPropertyChangeListeners->removeInterface( aPropertyName, xListener );
- throw rEx;
+ throw;
}
}
}
@@ -667,7 +667,7 @@ void SAL_CALL ContentResultSetWrapper
catch( Exception& rEx )
{
m_pVetoableChangeListeners->removeInterface( rPropertyName, xListener );
- throw rEx;
+ throw;
}
}
}
diff --git a/ucb/source/ucp/ftp/ftpurl.cxx b/ucb/source/ucp/ftp/ftpurl.cxx
index 376c77205b..88b5129673 100644
--- a/ucb/source/ucp/ftp/ftpurl.cxx
+++ b/ucb/source/ucp/ftp/ftpurl.cxx
@@ -420,7 +420,7 @@ namespace ftp {
FILE* FTPURL::open()
throw(curl_exception)
{
- if(!m_aPathSegmentVec.size())
+ if(m_aPathSegmentVec.empty())
throw curl_exception(CURLE_FTP_COULDNT_RETR_FILE);
CURL *curl = m_pFCP->handle();
@@ -597,7 +597,7 @@ rtl::OUString FTPURL::net_title() const
// We were either denied access when trying to login to
// an FTP server or when trying to change working directory
// to the one given in the URL.
- if(m_aPathSegmentVec.size())
+ if(!m_aPathSegmentVec.empty())
// determine title form url
aNetTitle = decodePathSegment(m_aPathSegmentVec.back());
else
@@ -701,7 +701,7 @@ void FTPURL::mkdir(bool ReplaceExisting) const
throw(curl_exception)
{
rtl::OString title;
- if(m_aPathSegmentVec.size()) {
+ if(!m_aPathSegmentVec.empty()) {
rtl::OUString titleOU = m_aPathSegmentVec.back();
titleOU = decodePathSegment(titleOU);
title = rtl::OString(titleOU.getStr(),
diff --git a/ucb/source/ucp/webdav/DAVResourceAccess.cxx b/ucb/source/ucp/webdav/DAVResourceAccess.cxx
index 9b02e5c562..4edc508318 100644
--- a/ucb/source/ucp/webdav/DAVResourceAccess.cxx
+++ b/ucb/source/ucp/webdav/DAVResourceAccess.cxx
@@ -1172,7 +1172,7 @@ sal_Bool DAVResourceAccess::detectRedirectCycle(
void DAVResourceAccess::resetUri()
{
osl::Guard< osl::Mutex > aGuard( m_aMutex );
- if ( m_aRedirectURIs.size() > 0 )
+ if ( !m_aRedirectURIs.empty() )
{
std::vector< NeonUri >::const_iterator it = m_aRedirectURIs.begin();
diff --git a/ucb/source/ucp/webdav/NeonLockStore.cxx b/ucb/source/ucp/webdav/NeonLockStore.cxx
index 7868a64816..8b7e96fe75 100644
--- a/ucb/source/ucp/webdav/NeonLockStore.cxx
+++ b/ucb/source/ucp/webdav/NeonLockStore.cxx
@@ -203,7 +203,7 @@ void NeonLockStore::removeLock( NeonLock * pLock )
m_aLockInfoMap.erase( pLock );
ne_lockstore_remove( m_pNeonLockStore, pLock );
- if ( m_aLockInfoMap.size() == 0 )
+ if ( m_aLockInfoMap.empty() )
stopTicker();
}
diff --git a/ucb/source/ucp/webdav/NeonSession.cxx b/ucb/source/ucp/webdav/NeonSession.cxx
index ae54ff4386..de7f69c293 100755
--- a/ucb/source/ucp/webdav/NeonSession.cxx
+++ b/ucb/source/ucp/webdav/NeonSession.cxx
@@ -1702,7 +1702,7 @@ bool NeonSession::removeExpiredLocktoken( const rtl::OUString & inURL,
PROPFIND( rEnv.m_aRequestURI, DAVZERO, aPropNames, aResources, rEnv );
- if ( aResources.size() == 0 )
+ if ( aResources.empty() )
return false;
std::vector< DAVPropertyValue >::const_iterator it
diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx
index d4c32fc239..3d03500f02 100644
--- a/ucb/source/ucp/webdav/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav/webdavcontent.cxx
@@ -1229,7 +1229,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
uno::Sequence< beans::Property > aProperties(
rProperties.getLength() );
- if ( m_aFailedPropNames.size() > 0 )
+ if ( !m_aFailedPropNames.empty() )
{
sal_Int32 nProps = 0;
sal_Int32 nCount = rProperties.getLength();
@@ -1268,7 +1268,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
ContentProperties::UCBNamesToDAVNames(
aProperties, aPropNames );
- if ( aPropNames.size() > 0 )
+ if ( !aPropNames.empty() )
{
std::vector< DAVResource > resources;
try
@@ -1320,7 +1320,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
aHeaderNames,
true /* bIncludeUnmatched */ );
- if ( aHeaderNames.size() > 0 )
+ if ( !aHeaderNames.empty() )
{
try
{
diff --git a/vbahelper/source/msforms/vbacontrols.cxx b/vbahelper/source/msforms/vbacontrols.cxx
index be5d05e7f3..6b57cd17c8 100644
--- a/vbahelper/source/msforms/vbacontrols.cxx
+++ b/vbahelper/source/msforms/vbacontrols.cxx
@@ -128,7 +128,7 @@ public:
virtual ::sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException)
{
- return ( mControls.size() > 0 );
+ return ( !mControls.empty() );
}
// XNameAcess
diff --git a/vbahelper/source/vbahelper/vbadocumentsbase.cxx b/vbahelper/source/vbahelper/vbadocumentsbase.cxx
index 0e5782d632..d7a455a61d 100644
--- a/vbahelper/source/vbahelper/vbadocumentsbase.cxx
+++ b/vbahelper/source/vbahelper/vbadocumentsbase.cxx
@@ -189,7 +189,7 @@ public:
virtual ::sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException)
{
- return (m_documents.size() > 0);
+ return (!m_documents.empty());
}
//XNameAccess
diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx b/xmlhelp/source/cxxhelp/provider/databases.cxx
index 9c1b9ca197..9b4ff9aaab 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.cxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.cxx
@@ -429,7 +429,7 @@ rtl::OUString Databases::getInstallPathAsURL()
const std::vector< rtl::OUString >& Databases::getModuleList( const rtl::OUString& Language )
{
- if( m_avModules.size() == 0 )
+ if( m_avModules.empty() )
{
rtl::OUString fileName,dirName = getInstallPathAsURL() + processLang( Language );
osl::Directory dirFile( dirName );