tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro

Change-Id: I35c883a1b05a797e83a41698fa205796e681d7c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141482
Tested-by: Jenkins
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
This commit is contained in:
OmkarAcharekar 2022-10-18 02:15:51 +05:30 committed by Ilmari Lauhakangas
parent 0bf8a781ff
commit 75e6ffe31d
4 changed files with 5 additions and 5 deletions

View file

@ -706,7 +706,7 @@ namespace
};
bool bCopied = false;
for (size_t i = 0; i < SAL_N_ELEMENTS(aStreamNames) && !bCopied; ++i)
for (size_t i = 0; i < std::size(aStreamNames) && !bCopied; ++i)
{
uno::Reference<io::XStream> xEmbeddedFile;
try

View file

@ -162,10 +162,10 @@ namespace abp
_rxContext, sDriverAliasesNodeName, -1, OConfigurationTreeRoot::CM_READONLY);
// loop through all programmatic pairs
DBG_ASSERT( 0 == SAL_N_ELEMENTS( pMappingProgrammatics ) % 2,
DBG_ASSERT( 0 == std::size( pMappingProgrammatics ) % 2,
"fieldmapping::defaultMapping: invalid programmatic map!" );
// number of pairs
sal_Int32 const nIntersectedProgrammatics = SAL_N_ELEMENTS( pMappingProgrammatics ) / 2;
sal_Int32 const nIntersectedProgrammatics = std::size( pMappingProgrammatics ) / 2;
const char** pProgrammatic = pMappingProgrammatics;
OUString sAddressProgrammatic;

View file

@ -284,7 +284,7 @@ int getFlatTypeRank(std::u16string_view rType)
"math_MathType_3x", // MathType equation embedded in Word doc.
};
size_t n = SAL_N_ELEMENTS(ranks);
size_t n = std::size(ranks);
for (size_t i = 0; i < n; ++i)
{

View file

@ -243,7 +243,7 @@ const CountryEntry pTable[] =
{ COUNTRY_UZBEKISTAN, LANGUAGE_UZBEK_LATIN, false }
};
const CountryEntry * const pEnd = pTable + SAL_N_ELEMENTS( pTable );
const CountryEntry * const pEnd = pTable + std::size( pTable );
/** Predicate comparing a country ID with the member of a CountryEntry. */
struct CountryEntryPred_Country