editeng/source/items/frmitems.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit a5c6fbe247ee9f9b2fba828d1360748c3fe4642b
Author:     Hossein <hoss...@libreoffice.org>
AuthorDate: Tue Feb 8 15:13:58 2022 +0100
Commit:     Hossein <hoss...@libreoffice.org>
CommitDate: Wed Feb 9 23:17:35 2022 +0100

    tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro
    
    The signed loop index variable of type 'int' is converted into
    'size_t' to match the return value of std::size() which is unsigned
    
    Change-Id: I39170c487a46aed0370d987f6ec94949c71509cd
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129676
    Tested-by: Jenkins
    Reviewed-by: Hossein <hoss...@libreoffice.org>

diff --git a/editeng/source/items/frmitems.cxx 
b/editeng/source/items/frmitems.cxx
index ba55d734515c..bd9840cfde0a 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -1560,7 +1560,7 @@ bool SvxBoxItem::PutValue( const uno::Any& rVal, 
sal_uInt8 nMemberId )
             {
                 // 4 Borders and 5 distances
                 const SvxBoxItemLine aBorders[] = { SvxBoxItemLine::LEFT, 
SvxBoxItemLine::RIGHT, SvxBoxItemLine::BOTTOM, SvxBoxItemLine::TOP };
-                for (int n(0); n != SAL_N_ELEMENTS(aBorders); ++n)
+                for (size_t n(0); n != std::size(aBorders); ++n)
                 {
                     if (!lcl_setLine(aSeq[n], *this, aBorders[n], bConvert))
                         return false;
@@ -2583,7 +2583,7 @@ OUString SvxFormatBreakItem::GetValueTextByPos( 
sal_uInt16 nPos )
         RID_SVXITEMS_BREAK_PAGE_AFTER,
         RID_SVXITEMS_BREAK_PAGE_BOTH
     };
-    static_assert(SAL_N_ELEMENTS(RID_SVXITEMS_BREAK) == size_t(SvxBreak::End), 
"unexpected size");
+    static_assert(std::size(RID_SVXITEMS_BREAK) == size_t(SvxBreak::End), 
"unexpected size");
     assert(nPos < sal_uInt16(SvxBreak::End) && "enum overflow!");
     return EditResId(RID_SVXITEMS_BREAK[nPos]);
 }

Reply via email to