Skip to content

Commit abe14c3

Browse files
committed
Rename ArraySize() to MATTER_ARRAY_SIZE
1 parent 86e0b85 commit abe14c3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/lib/support/CodeUtils.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ inline void chipDie(void)
678678
#endif
679679

680680
/**
681-
* @def ArraySize(aArray)
681+
* @def MATTER_ARRAY_SIZE(aArray)
682682
*
683683
* @brief
684684
* Returns the size of an array in number of elements.
@@ -687,16 +687,16 @@ inline void chipDie(void)
687687
*
688688
* @code
689689
* int numbers[10];
690-
* SortNumbers(numbers, ArraySize(numbers));
690+
* SortNumbers(numbers, MATTER_ARRAY_SIZE(numbers));
691691
* @endcode
692692
*
693693
* @return The size of an array in number of elements.
694694
*
695-
* @note Clever template-based solutions seem to fail when ArraySize is used
695+
* @note Clever template-based solutions seem to fail when MATTER_ARRAY_SIZE is used
696696
* with a variable-length array argument, so we just do the C-compatible
697697
* thing in C++ as well.
698698
*/
699-
#define ArraySize(a) (sizeof(a) / sizeof((a)[0]))
699+
#define MATTER_ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
700700

701701
/**
702702
* @brief Ensures that if `str` is NULL, a non-null `default_str_value` is provided

0 commit comments

Comments
 (0)