Skip to content

Commit ad4e7ed

Browse files
committedFeb 19, 2025
Updated usages of ArraySize() to MATTER_ARRAY_SIZE()
1 parent abe14c3 commit ad4e7ed

File tree

183 files changed

+735
-714
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

183 files changed

+735
-714
lines changed
 

‎examples/air-quality-sensor-app/silabs/src/SensorManager.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ void SensorManager::SensorTimerEventHandler(void * arg)
159159
static uint8_t simulatedIndex = 0;
160160

161161
// Ensure the simulatedIndex wraps around the array size to avoid out-of-bounds access
162-
simulatedIndex = simulatedIndex % ArraySize(mSimulatedAirQuality);
162+
simulatedIndex = simulatedIndex % MATTER_ARRAY_SIZE(mSimulatedAirQuality);
163163
// Retrieve the current air quality value from the simulated data array using the simulatedIndex
164164
air_quality = mSimulatedAirQuality[simulatedIndex];
165165

‎examples/all-clusters-app/all-clusters-common/src/dishwasher-mode.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ void DishwasherModeDelegate::HandleChangeToMode(uint8_t NewMode, ModeBase::Comma
4141

4242
CHIP_ERROR DishwasherModeDelegate::GetModeLabelByIndex(uint8_t modeIndex, chip::MutableCharSpan & label)
4343
{
44-
if (modeIndex >= ArraySize(kModeOptions))
44+
if (modeIndex >= MATTER_ARRAY_SIZE(kModeOptions))
4545
{
4646
return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED;
4747
}
@@ -50,7 +50,7 @@ CHIP_ERROR DishwasherModeDelegate::GetModeLabelByIndex(uint8_t modeIndex, chip::
5050

5151
CHIP_ERROR DishwasherModeDelegate::GetModeValueByIndex(uint8_t modeIndex, uint8_t & value)
5252
{
53-
if (modeIndex >= ArraySize(kModeOptions))
53+
if (modeIndex >= MATTER_ARRAY_SIZE(kModeOptions))
5454
{
5555
return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED;
5656
}
@@ -60,7 +60,7 @@ CHIP_ERROR DishwasherModeDelegate::GetModeValueByIndex(uint8_t modeIndex, uint8_
6060

6161
CHIP_ERROR DishwasherModeDelegate::GetModeTagsByIndex(uint8_t modeIndex, List<ModeTagStructType> & tags)
6262
{
63-
if (modeIndex >= ArraySize(kModeOptions))
63+
if (modeIndex >= MATTER_ARRAY_SIZE(kModeOptions))
6464
{
6565
return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED;
6666
}

0 commit comments

Comments
 (0)