diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-19 08:12:17 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-19 10:02:39 +0200 |
commit | 2c1b7e8d6a7fa22cb91919238418816671c3a497 (patch) | |
tree | 6f356017d24dffcd25261295ab25a21b738dc835 /filter | |
parent | ad18bb24d51e4f735085d50c496d28bd637dbb0b (diff) |
clang-tidy readability-container-size-empty
Change-Id: I1df70b7dff5ebb6048f7fc618789faa15ca5d422
Reviewed-on: https://gerrit.libreoffice.org/61967
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/config/cache/cacheitem.cxx | 2 | ||||
-rw-r--r-- | filter/source/config/cache/filtercache.cxx | 6 | ||||
-rw-r--r-- | filter/source/config/cache/typedetection.cxx | 6 | ||||
-rw-r--r-- | filter/source/flash/swfwriter1.cxx | 2 | ||||
-rw-r--r-- | filter/source/graphicfilter/eps/eps.cxx | 2 | ||||
-rw-r--r-- | filter/source/graphicfilter/idxf/dxfentrd.cxx | 2 | ||||
-rw-r--r-- | filter/source/svg/svgwriter.cxx | 2 |
7 files changed, 11 insertions, 11 deletions
diff --git a/filter/source/config/cache/cacheitem.cxx b/filter/source/config/cache/cacheitem.cxx index a8ac838dee1e..d494725eb9dd 100644 --- a/filter/source/config/cache/cacheitem.cxx +++ b/filter/source/config/cache/cacheitem.cxx @@ -73,7 +73,7 @@ void CacheItem::validateUINames(const OUString& sActLocale) // 1a) set UIName inside list of UINames for current locale lUINames[sActLocale] <<= sUIName; } - else if (lUINames.size()>0) + else if (!lUINames.empty()) { // 1b) or get it from this list, if it not exist! lUINames[sActLocale] >>= sUIName; diff --git a/filter/source/config/cache/filtercache.cxx b/filter/source/config/cache/filtercache.cxx index d3cf357f165d..0e2f60dddf6b 100644 --- a/filter/source/config/cache/filtercache.cxx +++ b/filter/source/config/cache/filtercache.cxx @@ -569,7 +569,7 @@ void FilterCache::flush() // renew all dependencies and optimizations impl_validateAndOptimize(); - if (m_lChangedTypes.size() > 0) + if (!m_lChangedTypes.empty()) { css::uno::Reference< css::container::XNameAccess > xConfig(impl_openConfig(E_PROVIDER_TYPES), css::uno::UNO_QUERY_THROW); css::uno::Reference< css::container::XNameAccess > xSet ; @@ -581,7 +581,7 @@ void FilterCache::flush() xFlush->commitChanges(); } - if (m_lChangedFilters.size() > 0) + if (!m_lChangedFilters.empty()) { css::uno::Reference< css::container::XNameAccess > xConfig(impl_openConfig(E_PROVIDER_FILTERS), css::uno::UNO_QUERY_THROW); css::uno::Reference< css::container::XNameAccess > xSet ; @@ -2122,7 +2122,7 @@ CacheItem FilterCache::impl_readOldItem(const css::uno::Reference< css::containe lData = impl_tokenizeString(sData, ','); if ( (sData.isEmpty()) || - (lData.size()<1 ) + (lData.empty() ) ) { throw css::uno::Exception( "Can not read old item property DATA.", css::uno::Reference< css::uno::XInterface >()); diff --git a/filter/source/config/cache/typedetection.cxx b/filter/source/config/cache/typedetection.cxx index fa23e96ba126..b5268857ca9b 100644 --- a/filter/source/config/cache/typedetection.cxx +++ b/filter/source/config/cache/typedetection.cxx @@ -89,7 +89,7 @@ OUString SAL_CALL TypeDetection::queryTypeByURL(const OUString& sURL) cache.detectFlatForURL(aURL, lFlatTypes); if ( - (lFlatTypes.size() < 1 ) && + (lFlatTypes.empty() ) && (!cache.isFillState(FilterCache::E_CONTAINS_TYPES)) ) { @@ -98,7 +98,7 @@ OUString SAL_CALL TypeDetection::queryTypeByURL(const OUString& sURL) } // first item is guaranteed as "preferred" one! - if (lFlatTypes.size() > 0) + if (!lFlatTypes.empty()) { const FlatDetectionInfo& aMatch = *(lFlatTypes.begin()); sType = aMatch.sType; @@ -426,7 +426,7 @@ OUString SAL_CALL TypeDetection::queryTypeByDescriptor(css::uno::Sequence< css:: // throwing an exception if creation of the might needed input // stream failed by e.g. an IO exception ... std::vector<OUString> lUsedDetectors; - if (lFlatTypes.size()>0) + if (!lFlatTypes.empty()) sType = impl_detectTypeFlatAndDeep(stlDescriptor, lFlatTypes, bAllowDeep, lUsedDetectors, sLastChance); // flat detection failed diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx index 03042a9c86a2..f32eb9538f53 100644 --- a/filter/source/flash/swfwriter1.cxx +++ b/filter/source/flash/swfwriter1.cxx @@ -1099,7 +1099,7 @@ bool Writer::Impl_writeStroke( SvtGraphicStroke const & rStroke ) SvtGraphicStroke::DashArray aDashArray; rStroke.getDashArray( aDashArray ); - if( 0 != aDashArray.size() ) + if( !aDashArray.empty() ) return false; // todo: implement dashes Color aColor( mpVDev->GetLineColor() ); diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx index f20e899c0cc6..28e0f59b40b2 100644 --- a/filter/source/graphicfilter/eps/eps.cxx +++ b/filter/source/graphicfilter/eps/eps.cxx @@ -1260,7 +1260,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) bSkipSequence = false; if ( static_cast<sal_uInt32>(eJT) > 2 ) bSkipSequence = false; - if ( l_aDashArray.size() && ( fStrokeWidth != 0.0 ) ) + if ( !l_aDashArray.empty() && ( fStrokeWidth != 0.0 ) ) bSkipSequence = false; if ( bSkipSequence ) { diff --git a/filter/source/graphicfilter/idxf/dxfentrd.cxx b/filter/source/graphicfilter/idxf/dxfentrd.cxx index a2949dd6578a..0f30ba60f1bc 100644 --- a/filter/source/graphicfilter/idxf/dxfentrd.cxx +++ b/filter/source/graphicfilter/idxf/dxfentrd.cxx @@ -633,7 +633,7 @@ bool DXFBoundaryPathData::EvaluateGroup( DXFGroupReader & rDGR ) case 4 : aEdges.emplace_back( new DXFEdgeTypeSpline() ); break; } } - else if ( aEdges.size() ) + else if ( !aEdges.empty() ) aEdges[ aEdges.size() - 1 ]->EvaluateGroup( rDGR ); else bExecutingGroupCode = false; diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index 6fff0b0cb99d..eff3d607fa77 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -2050,7 +2050,7 @@ void SVGActionWriter::ImplWriteShape( const SVGShapeDescriptor& rShape ) } } - if( rShape.maDashArray.size() ) + if( !rShape.maDashArray.empty() ) { OUStringBuffer aDashArrayStr; |