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 /sfx2 | |
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 'sfx2')
-rw-r--r-- | sfx2/source/control/dispatch.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/control/thumbnailview.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/filedlghelper.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/dialog/filtergrouping.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/doctemplateslocal.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/notebookbar/PriorityHBox.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/notify/globalevents.cxx | 2 |
7 files changed, 8 insertions, 8 deletions
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index 0d2b41fcecd2..f000d3896f45 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -499,7 +499,7 @@ void SfxDispatcher::Pop(SfxShell& rShell, SfxDispatcherPopFlags nMode) << (bUntil ? " (up to)" : "")); // same shell as on top of the to-do stack? - if(xImp->aToDoStack.size() && xImp->aToDoStack.front().pCluster == &rShell) + if(!xImp->aToDoStack.empty() && xImp->aToDoStack.front().pCluster == &rShell) { // cancel inverse actions if ( xImp->aToDoStack.front().bPush != bPush ) diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx index 13435a923627..45514d7b1681 100644 --- a/sfx2/source/control/thumbnailview.cxx +++ b/sfx2/source/control/thumbnailview.cxx @@ -870,7 +870,7 @@ void ThumbnailView::GetFocus() nSelected = i; } - if (nSelected == -1 && mItemList.size() > 0) + if (nSelected == -1 && !mItemList.empty()) { SelectItem(1); } diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index 26dcd99f3bc9..9784a268c39c 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -2426,7 +2426,7 @@ OUString FileDialogHelper::GetPath() const { OUString aPath; - if ( mpImpl->mlLastURLs.size() > 0) + if ( !mpImpl->mlLastURLs.empty()) return mpImpl->mlLastURLs[0]; if ( mpImpl->mxFileDlg.is() ) @@ -2444,7 +2444,7 @@ OUString FileDialogHelper::GetPath() const Sequence < OUString > FileDialogHelper::GetMPath() const { - if ( mpImpl->mlLastURLs.size() > 0) + if ( !mpImpl->mlLastURLs.empty()) return comphelper::containerToSequence(mpImpl->mlLastURLs); if ( mpImpl->mxFileDlg.is() ) diff --git a/sfx2/source/dialog/filtergrouping.cxx b/sfx2/source/dialog/filtergrouping.cxx index c92d197f2f6e..866e6e1a2292 100644 --- a/sfx2/source/dialog/filtergrouping.cxx +++ b/sfx2/source/dialog/filtergrouping.cxx @@ -805,7 +805,7 @@ namespace sfx2 if ( m_xFilterGroupManager.is() ) { // the file dialog implementation supports visual grouping of filters // create a representation of the group which is understandable by the XFilterGroupManager - if ( _rGroup.size() ) + if ( !_rGroup.empty() ) { Sequence< StringPair > aFilters( comphelper::containerToSequence(_rGroup) ); if ( _bAddExtension ) diff --git a/sfx2/source/doc/doctemplateslocal.cxx b/sfx2/source/doc/doctemplateslocal.cxx index 294274e2e472..197047de7af6 100644 --- a/sfx2/source/doc/doctemplateslocal.cxx +++ b/sfx2/source/doc/doctemplateslocal.cxx @@ -145,7 +145,7 @@ void SAL_CALL DocTemplLocaleHelper::startElement( const OUString& aName, const u { if ( aName == g_sGroupListElement ) { - if ( m_aElementsSeq.size() != 0 ) + if ( !m_aElementsSeq.empty() ) throw xml::sax::SAXException(); // TODO: this element must be the first level element m_aElementsSeq.push_back( aName ); diff --git a/sfx2/source/notebookbar/PriorityHBox.cxx b/sfx2/source/notebookbar/PriorityHBox.cxx index 83b6288afdcb..0a641e2c8259 100644 --- a/sfx2/source/notebookbar/PriorityHBox.cxx +++ b/sfx2/source/notebookbar/PriorityHBox.cxx @@ -200,7 +200,7 @@ void PriorityHBox::GetChildrenWithPriorities() m_aSortedChildren.push_back(pPrioritable); } - if (!m_aSortedChildren.size()) + if (m_aSortedChildren.empty()) m_bInitialized = false; std::sort(m_aSortedChildren.begin(), m_aSortedChildren.end(), lcl_comparePriority); diff --git a/sfx2/source/notify/globalevents.cxx b/sfx2/source/notify/globalevents.cxx index ed495f8d23ef..ca3b680f295e 100644 --- a/sfx2/source/notify/globalevents.cxx +++ b/sfx2/source/notify/globalevents.cxx @@ -339,7 +339,7 @@ sal_Bool SAL_CALL SfxGlobalEvents_Impl::hasElements() { // SAFE -> ::osl::ResettableMutexGuard aLock(m_aLock); - return (m_lModels.size()>0); + return (!m_lModels.empty()); // <- SAFE } |