diff options
author | Hossein <hossein@libreoffice.org> | 2022-02-08 15:13:58 +0100 |
---|---|---|
committer | Hossein <hossein@libreoffice.org> | 2022-02-09 23:17:35 +0100 |
commit | a5c6fbe247ee9f9b2fba828d1360748c3fe4642b (patch) | |
tree | 638af9b213b63895fb4dfb5e9abb08ed83e28bad /editeng | |
parent | 134edb2f4a06398e2725628200292b816d79bbb9 (diff) |
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 <hossein@libreoffice.org>
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/items/frmitems.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
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]); } |