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/source/config | |
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/source/config')
-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 |
3 files changed, 7 insertions, 7 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 |