mirror of
https://github.com/gryf/wmaker.git
synced 2026-02-16 05:55:45 +01:00
WINGs: Use the macro 'wlengthof' to get the number of element in an array
The new macro 'wlengthof' from WUtil makes code easier to read than the previous [sizeof() / sizeof([0]) ] construct. Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
fd47650717
commit
a3b6b62049
@@ -442,7 +442,7 @@ static void addSizeToTypeface(Typeface * face, int size)
|
||||
if (size == 0) {
|
||||
int j;
|
||||
|
||||
for (j = 0; j < sizeof(scalableFontSizes) / sizeof(scalableFontSizes[0]); j++) {
|
||||
for (j = 0; j < wlengthof(scalableFontSizes); j++) {
|
||||
size = scalableFontSizes[j];
|
||||
|
||||
if (!WMCountInArray(face->sizes, (void *)(uintptr_t) size)) {
|
||||
|
||||
Reference in New Issue
Block a user