sw/source/core/doc/textboxhelper.cxx | 2 +- sw/source/core/table/swnewtable.cxx | 2 +- sw/source/core/unocore/unotbl.cxx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
New commits: commit 3f6396291a044274fd3238c797f3aff4a458fa37 Author: Julien Nabet <serval2...@yahoo.fr> AuthorDate: Sun Dec 31 12:29:03 2023 +0100 Commit: Julien Nabet <serval2...@yahoo.fr> CommitDate: Mon Jan 1 12:13:25 2024 +0100 Replace "size() != 0 with !empty()" (sw) Change-Id: Iaa94c0b057694429b327cbca847fee06ad74256a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161489 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2...@yahoo.fr> diff --git a/sw/source/core/doc/textboxhelper.cxx b/sw/source/core/doc/textboxhelper.cxx index 253e39a29383..4a1dfc6ead43 100644 --- a/sw/source/core/doc/textboxhelper.cxx +++ b/sw/source/core/doc/textboxhelper.cxx @@ -1686,7 +1686,7 @@ SwTextBoxNode::SwTextBoxNode(SwFrameFormat* pOwnerShape) SwTextBoxNode::~SwTextBoxNode() { - if (m_pTextBoxes.size() != 0) + if (!m_pTextBoxes.empty()) { SAL_WARN("sw.core", "SwTextBoxNode::~SwTextBoxNode(): Text-Box-Vector still not empty!"); assert(false); diff --git a/sw/source/core/table/swnewtable.cxx b/sw/source/core/table/swnewtable.cxx index 3cc2e3670711..1a21a9e0354b 100644 --- a/sw/source/core/table/swnewtable.cxx +++ b/sw/source/core/table/swnewtable.cxx @@ -2383,7 +2383,7 @@ bool SwTable::CanConvertSubtables() const { return false; // no formulas in fields yet } - if (pDoc->GetAttrPool().GetItemSurrogates(RES_BOXATR_FORMULA).size() != 0) + if (!pDoc->GetAttrPool().GetItemSurrogates(RES_BOXATR_FORMULA).empty()) { return false; // no table box formulas yet } diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index eb683b0b1c69..70c1849df7e9 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -503,7 +503,7 @@ static const SwTableBox* lcl_FindCornerTableBox(const SwTableLines& rTableLines, const SwTableLine* pLine(i_bTopLeft ? pLines->front() : pLines->back()); assert(pLine); const SwTableBoxes& rBoxes(pLine->GetTabBoxes()); - assert(rBoxes.size() != 0); + assert(!rBoxes.empty()); const SwTableBox* pBox = i_bTopLeft ? rBoxes.front() : rBoxes.back(); assert(pBox); if (pBox->GetSttNd())