tdf#147021 avoid use of SAL_N_ELEMENTS macro in FormulaCompiler.cxx

Change-Id: I09457280ba43d3cce5c998d1c50d606fc4a124e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200264
Reviewed-by: David Gilbert <freedesktop@treblig.org>
Tested-by: Jenkins
This commit is contained in:
Simon Chenery
2026-03-01 18:27:57 +01:00
committed by David Gilbert
parent 2400aef4f2
commit e8766959f0
+4 -4
View File
@@ -533,7 +533,7 @@ uno::Sequence< sheet::FormulaOpCodeMapEntry > FormulaCompiler::OpCodeMap::create
{ FormulaMapGroupSpecialOffset::WHITESPACE , ocWhitespace } ,
{ FormulaMapGroupSpecialOffset::TABLE_REF , ocTableRef }
};
const size_t nCount = SAL_N_ELEMENTS(aMap);
const size_t nCount = std::size(aMap);
// Preallocate vector elements.
FormulaOpCodeMapEntry aEntry;
aEntry.Token.OpCode = getOpCodeUnknown();
@@ -569,7 +569,7 @@ uno::Sequence< sheet::FormulaOpCodeMapEntry > FormulaCompiler::OpCodeMap::create
SC_OPCODE_CLOSE,
SC_OPCODE_SEP,
};
lclPushOpCodeMapEntries( aVec, mpTable.get(), aOpCodes, SAL_N_ELEMENTS(aOpCodes) );
lclPushOpCodeMapEntries( aVec, mpTable.get(), aOpCodes, std::size(aOpCodes) );
}
if ((nGroups & FormulaMapGroup::ARRAY_SEPARATORS) != 0)
{
@@ -579,7 +579,7 @@ uno::Sequence< sheet::FormulaOpCodeMapEntry > FormulaCompiler::OpCodeMap::create
SC_OPCODE_ARRAY_ROW_SEP,
SC_OPCODE_ARRAY_COL_SEP
};
lclPushOpCodeMapEntries( aVec, mpTable.get(), aOpCodes, SAL_N_ELEMENTS(aOpCodes) );
lclPushOpCodeMapEntries( aVec, mpTable.get(), aOpCodes, std::size(aOpCodes) );
}
if ((nGroups & FormulaMapGroup::UNARY_OPERATORS) != 0)
{
@@ -629,7 +629,7 @@ uno::Sequence< sheet::FormulaOpCodeMapEntry > FormulaCompiler::OpCodeMap::create
SC_OPCODE_AND,
SC_OPCODE_OR
};
lclPushOpCodeMapEntries( aVec, mpTable.get(), aOpCodes, SAL_N_ELEMENTS(aOpCodes) );
lclPushOpCodeMapEntries( aVec, mpTable.get(), aOpCodes, std::size(aOpCodes) );
// functions with 2 or more parameters.
for (sal_uInt16 nOp = SC_OPCODE_START_2_PAR; nOp < SC_OPCODE_STOP_2_PAR && nOp < mnSymbols; ++nOp)
{