include/o3tl/unit_conversion.hxx | 2 +- lotuswordpro/source/filter/lwpsilverbullet.hxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
New commits: commit 5b320aa058504becae6ac6746926b481b326a24d Author: psidiumcode <lbrmk....@rgn4d.neomailbox.ch> AuthorDate: Tue Mar 15 21:43:46 2022 +0200 Commit: Hossein <hoss...@libreoffice.org> CommitDate: Wed Mar 16 09:13:23 2022 +0100 tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro Change-Id: Ia711e939f769c6a2257bd1fb3607b315f931a0ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131634 Tested-by: Jenkins Reviewed-by: Hossein <hoss...@libreoffice.org> diff --git a/include/o3tl/unit_conversion.hxx b/include/o3tl/unit_conversion.hxx index 7f67882f7e3d..67830f0d16d7 100644 --- a/include/o3tl/unit_conversion.hxx +++ b/include/o3tl/unit_conversion.hxx @@ -179,7 +179,7 @@ constexpr m_and_d mdBaseLen[] = { { 254 * 210, 10 * 1440 }, // ch => mm { 254 * 312, 10 * 1440 }, // line => mm }; -static_assert(SAL_N_ELEMENTS(mdBaseLen) == static_cast<int>(Length::count), +static_assert(std::size(mdBaseLen) == static_cast<int>(Length::count), "mdBaseL must have an entry for each unit in o3tl::Length"); // The resulting multipliers and divisors array diff --git a/lotuswordpro/source/filter/lwpsilverbullet.hxx b/lotuswordpro/source/filter/lwpsilverbullet.hxx index 5c2f51247b31..8c68a960eedc 100644 --- a/lotuswordpro/source/filter/lwpsilverbullet.hxx +++ b/lotuswordpro/source/filter/lwpsilverbullet.hxx @@ -149,7 +149,7 @@ private: inline const OUString& LwpSilverBullet::GetBulletStyleName() const { return m_strStyleName; } inline bool LwpSilverBullet::IsLesserLevel(sal_uInt16 nPos) { - if (nPos < SAL_N_ELEMENTS(m_pResetPositionFlags)) + if (nPos < std::size(m_pResetPositionFlags)) return ((m_pResetPositionFlags[nPos] & LESSERLEVEL) != 0); return false; }