[Libreoffice-commits] core.git: sw/source

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Thu Oct 7 06:06:22 UTC 2021


 sw/source/core/doc/textboxhelper.cxx |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit f78aebd4c2a2b740559e54906a26653dc89fd610
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Wed Oct 6 20:06:19 2021 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Thu Oct 7 08:05:50 2021 +0200

    sw: size() -> !empty() in textboxhelper
    
    To avoid an implicit integer to boolean conversion.
    
    Change-Id: If4f91d4ebfc0c2a66e0c526d3826aed4b7558ec2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123185
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>

diff --git a/sw/source/core/doc/textboxhelper.cxx b/sw/source/core/doc/textboxhelper.cxx
index 7c6110e714d2..6d19209c4ad3 100644
--- a/sw/source/core/doc/textboxhelper.cxx
+++ b/sw/source/core/doc/textboxhelper.cxx
@@ -1388,7 +1388,7 @@ SwTextBoxNode::SwTextBoxNode(SwFrameFormat* pOwnerShape)
     assert(pOwnerShape->Which() == RES_DRAWFRMFMT);
 
     m_pOwnerShapeFormat = pOwnerShape;
-    if (m_pTextBoxes.size())
+    if (!m_pTextBoxes.empty())
         m_pTextBoxes.clear();
 }
 
@@ -1422,7 +1422,7 @@ void SwTextBoxNode::AddTextBox(SdrObject* pDrawObject, SwFrameFormat* pNewTextBo
 void SwTextBoxNode::DelTextBox(const SdrObject* pDrawObject)
 {
     assert(pDrawObject);
-    if (m_pTextBoxes.size())
+    if (!m_pTextBoxes.empty())
     {
         for (auto it = m_pTextBoxes.begin(); it != m_pTextBoxes.end();)
         {
@@ -1442,7 +1442,7 @@ void SwTextBoxNode::DelTextBox(const SdrObject* pDrawObject)
 SwFrameFormat* SwTextBoxNode::GetTextBox(const SdrObject* pDrawObject) const
 {
     assert(pDrawObject);
-    if (m_pTextBoxes.size())
+    if (!m_pTextBoxes.empty())
     {
         for (auto it = m_pTextBoxes.begin(); it != m_pTextBoxes.end(); it++)
         {
@@ -1459,7 +1459,7 @@ bool SwTextBoxNode::IsTextBoxActive(const SdrObject* pDrawObject) const
 {
     assert(pDrawObject);
 
-    if (m_pTextBoxes.size())
+    if (!m_pTextBoxes.empty())
     {
         for (auto it = m_pTextBoxes.begin(); it != m_pTextBoxes.end(); it++)
         {
@@ -1476,7 +1476,7 @@ void SwTextBoxNode::SetTextBoxActive(const SdrObject* pDrawObject)
 {
     assert(pDrawObject);
 
-    if (m_pTextBoxes.size())
+    if (!m_pTextBoxes.empty())
     {
         for (auto it = m_pTextBoxes.begin(); it != m_pTextBoxes.end(); it++)
         {
@@ -1492,7 +1492,7 @@ void SwTextBoxNode::SetTextBoxInactive(const SdrObject* pDrawObject)
 {
     assert(pDrawObject);
 
-    if (m_pTextBoxes.size())
+    if (!m_pTextBoxes.empty())
     {
         for (auto it = m_pTextBoxes.begin(); it != m_pTextBoxes.end(); it++)
         {


More information about the Libreoffice-commits mailing list