tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro
Change-Id: Ifed6b79a4186e3196dc1e9ac179fe8ad0ee4a342
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131655
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
diff --git a/sc/source/core/tool/odffmap.cxx b/sc/source/core/tool/odffmap.cxx
index 5cbfdee..112854f 100644
--- a/sc/source/core/tool/odffmap.cxx
+++ b/sc/source/core/tool/odffmap.cxx
@@ -18,7 +18,6 @@
*/
#include <compiler.hxx>
#include <sal/macros.h>
// ODFF, English, MapDupToInternal when writing ODFF, Programmatical, ODF_11
// functions duplicated to internal when writing ODFF are listed in static const XclFunctionInfo saFuncTable_4[]
@@ -137,7 +136,7 @@ const ScCompiler::AddInMap ScCompiler::g_aAddInMap[] =
size_t ScCompiler::GetAddInMapCount()
{
return SAL_N_ELEMENTS(g_aAddInMap);
return std::size(g_aAddInMap);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/rtftok/rtfcharsets.cxx b/writerfilter/source/rtftok/rtfcharsets.cxx
index 69e416c..f7a03ee1 100644
--- a/writerfilter/source/rtftok/rtfcharsets.cxx
+++ b/writerfilter/source/rtftok/rtfcharsets.cxx
@@ -8,7 +8,7 @@
*/
#include "rtfcharsets.hxx"
#include <sal/macros.h>
#include <array>
namespace writerfilter::rtftok
{
@@ -48,7 +48,7 @@ RTFEncoding const aRTFEncodings[] = {
{ 255, 850 }, // OEM
};
int nRTFEncodings = SAL_N_ELEMENTS(aRTFEncodings);
int nRTFEncodings = std::size(aRTFEncodings);
} // namespace writerfilter::rtftok