1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-24 07:02:30 +01:00

WPrefs: 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:
Christophe CURIS
2013-11-08 21:18:22 +01:00
committed by Carlos R. Mafra
parent be022d9623
commit 01c7390be1
5 changed files with 8 additions and 8 deletions

View File

@@ -509,7 +509,7 @@ static void createPanel(Panel * p)
WMSetListUserDrawProc(panel->actLs, paintItem);
WMHangData(panel->actLs, panel);
for (i = 0; i < sizeof(keyOptions)/sizeof(keyOptions[0]); i++) {
for (i = 0; i < wlengthof(keyOptions); i++) {
WMAddListItem(panel->actLs, _(keyOptions[i].title));
}
WMSetListAction(panel->actLs, listClick, panel);