From 81aad6d53fa792dd95732e401ecb298714f699f4 Mon Sep 17 00:00:00 2001 From: Roman Kuznetsov Date: Sun, 29 May 2022 15:27:29 +0200 Subject: [PATCH] tdf#147021 Use std::size() instead SAL_N_ELEMENTS macro Change-Id: Id91ca2d7002b3743ecaed7b40edda3f85e080884 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135061 Tested-by: Jenkins Reviewed-by: Roman Kuznetsov --- tools/source/reversemap/bestreversemap.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/source/reversemap/bestreversemap.cxx b/tools/source/reversemap/bestreversemap.cxx index 02a81932b3f2..f124140c1918 100644 --- a/tools/source/reversemap/bestreversemap.cxx +++ b/tools/source/reversemap/bestreversemap.cxx @@ -11,6 +11,7 @@ #include #include +#include #include namespace { @@ -91,7 +92,7 @@ int main() sal_Unicode c = 0; while (c < 0xFFFF) { - for (size_t i = 0; i < SAL_N_ELEMENTS(aConverters); ++i) + for (size_t i = 0; i < std::size(aConverters); ++i) aConverters[i].reset(); int nMostCapable = -1; @@ -99,7 +100,7 @@ int main() while(c < 0xFFFF) { bool bSomethingCapable = false; - for (size_t i = 0; i < SAL_N_ELEMENTS(aConverters); ++i) + for (size_t i = 0; i < std::size(aConverters); ++i) { if (aConverters[i].isOK()) aConverters[i].checkSupports(c); @@ -119,7 +120,7 @@ int main() while(c < 0xFFFF) { bool bNothingCapable = true; - for (size_t i = 0; i < SAL_N_ELEMENTS(aConverters); ++i) + for (size_t i = 0; i < std::size(aConverters); ++i) { aConverters[i].checkSupports(c); if (aConverters[i].isOK())