summaryrefslogtreecommitdiff
path: root/scripting/source
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2015-01-04 19:09:27 +0100
committerJulien Nabet <serval2412@yahoo.fr>2015-01-04 19:11:13 +0100
commit7da92fdcb040d1f82fc2a6c61fd05f76f7344035 (patch)
tree53d1eb844f8f5562482b78a85986a06466496005 /scripting/source
parent6fd453224fc5fcf9953092d2883ab45417980f48 (diff)
cppcheck: Possible inefficient checking for <var> emptiness
Change-Id: I6ca0e477a4429e762c48c721951b9876db3a5c6c
Diffstat (limited to 'scripting/source')
-rw-r--r--scripting/source/provider/ProviderCache.cxx2
-rw-r--r--scripting/source/stringresource/stringresource.cxx2
-rw-r--r--scripting/source/vbaevents/eventhelper.cxx2
3 files changed, 3 insertions, 3 deletions
diff --git a/scripting/source/provider/ProviderCache.cxx b/scripting/source/provider/ProviderCache.cxx
index b094e2e224de..d02550e3ea87 100644
--- a/scripting/source/provider/ProviderCache.cxx
+++ b/scripting/source/provider/ProviderCache.cxx
@@ -93,7 +93,7 @@ ProviderCache::getAllProviders() throw ( RuntimeException )
ProviderDetails_hash::iterator h_itEnd = m_hProviderDetailsCache.end();
ProviderDetails_hash::iterator h_it = m_hProviderDetailsCache.begin();
// should assert if size !> 0
- if ( m_hProviderDetailsCache.size() )
+ if ( !m_hProviderDetailsCache.empty() )
{
sal_Int32 providerIndex = 0;
sal_Int32 index = 0;
diff --git a/scripting/source/stringresource/stringresource.cxx b/scripting/source/stringresource/stringresource.cxx
index 667a9008d2b6..3a693d2297cc 100644
--- a/scripting/source/stringresource/stringresource.cxx
+++ b/scripting/source/stringresource/stringresource.cxx
@@ -2202,7 +2202,7 @@ bool StringResourcePersistenceImpl::implWritePropertiesFile( LocaleItem* pLocale
xTextOutputStream->writeString( aLineFeedStr );
const IdToStringMap& rHashMap = pLocaleItem->m_aIdToStringMap;
- if( rHashMap.size() > 0 )
+ if( !rHashMap.empty() )
{
// Sort ids according to read order
const IdToIndexMap& rIndexMap = pLocaleItem->m_aIdToIndexMap;
diff --git a/scripting/source/vbaevents/eventhelper.cxx b/scripting/source/vbaevents/eventhelper.cxx
index 5ab80dfab21f..a9e970dc964d 100644
--- a/scripting/source/vbaevents/eventhelper.cxx
+++ b/scripting/source/vbaevents/eventhelper.cxx
@@ -495,7 +495,7 @@ public:
virtual Type SAL_CALL getElementType( ) throw (RuntimeException, std::exception) SAL_OVERRIDE
{ return cppu::UnoType<OUString>::get(); }
virtual sal_Bool SAL_CALL hasElements( ) throw (RuntimeException, std::exception) SAL_OVERRIDE
- { return ( ( m_hEvents.size() > 0 ? sal_True : sal_False ) ); }
+ { return ( ( m_hEvents.empty() ? sal_False : sal_True ) ); }
private:
typedef std::unordered_map< OUString, Any, OUStringHash,