refactor: replace sizeof in loop with ELEMENTSOF & FOREACH_ELEMENT (#34863)

This commit is contained in:
Integral
2024-10-23 10:32:02 +02:00
committed by GitHub
parent 4d5d574906
commit b6b8527cd1
4 changed files with 12 additions and 15 deletions
+2 -1
View File
@@ -6,6 +6,7 @@
*/
#include "gunicode.h"
#include "macro.h"
#define unichar uint32_t
@@ -92,7 +93,7 @@ unichar_iswide (unichar c)
{0x20000, 0x2FFFD}, {0x30000, 0x3FFFD},
};
if (bsearch ((void *)(uintptr_t)c, wide, (sizeof (wide) / sizeof ((wide)[0])), sizeof wide[0],
if (bsearch ((void *)(uintptr_t)c, wide, ELEMENTSOF(wide), sizeof wide[0],
interval_compare))
return true;