Codechange: replace cpp_lengthof with safe alternatives

This commit is contained in:
Rubidium
2024-04-07 15:54:24 +02:00
committed by rubidium42
parent a1a01e21cf
commit c377c4740d
3 changed files with 3 additions and 11 deletions

View File

@@ -301,14 +301,6 @@ char (&ArraySizeHelper(T (&array)[N]))[N];
*/
#define cpp_sizeof(base, variable) (sizeof(std::declval<base>().variable))
/**
* Gets the length of an array variable within a class.
* @param base The class the variable is in.
* @param variable The array variable to get the size of.
* @return the length of the array
*/
#define cpp_lengthof(base, variable) (cpp_sizeof(base, variable) / cpp_sizeof(base, variable[0]))
/* take care of some name clashes on MacOS */
#if defined(__APPLE__)