summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2011-04-26 16:43:54 -0400
committerKohei Yoshida <kyoshida@novell.com>2011-04-26 16:43:54 -0400
commit597bd66fc63ad5517bfe9f53b7244191274ba2cc (patch)
tree2c3c28d42d86fc28f8da06ad02a6631fa943112a /sc
parentee7ec39b3b213e81eb78ddbff232ce9d32439262 (diff)
Prefer empty() over size() where it makes sense.
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/dptablecache.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/sc/source/core/data/dptablecache.cxx b/sc/source/core/data/dptablecache.cxx
index 008cdfcf3935..d6981cfa85c8 100644
--- a/sc/source/core/data/dptablecache.cxx
+++ b/sc/source/core/data/dptablecache.cxx
@@ -928,10 +928,11 @@ sal_uLong ScDPCache::GetNumberFormat( long nDim ) const
{
if ( nDim >= mnColumnCount )
return 0;
- if ( maTableDataValues[nDim].size()==0 )
+
+ if (maTableDataValues[nDim].empty())
return 0;
- else
- return maTableDataValues[nDim][0].nNumFormat;
+
+ return maTableDataValues[nDim][0].nNumFormat;
}
bool ScDPCache::IsDateDimension( long nDim ) const