mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-04 12:54:20 +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:
committed by
Carlos R. Mafra
parent
be022d9623
commit
01c7390be1
@@ -613,13 +613,13 @@ static void createPanel(Panel * p)
|
||||
WMResizeWidget(panel->wheelP, 135, 20);
|
||||
WMMoveWidget(panel->wheelP, 95, 129);
|
||||
|
||||
for (i = 0; i < sizeof(buttonActions) / sizeof(buttonActions[0]); i++) {
|
||||
for (i = 0; i < wlengthof(buttonActions); i++) {
|
||||
WMAddPopUpButtonItem(panel->button1P, buttonActions[i]);
|
||||
WMAddPopUpButtonItem(panel->button2P, buttonActions[i]);
|
||||
WMAddPopUpButtonItem(panel->button3P, buttonActions[i]);
|
||||
}
|
||||
|
||||
for (i = 0; i < sizeof(wheelActions) / sizeof(wheelActions[0]); i++) {
|
||||
for (i = 0; i < wlengthof(wheelActions); i++) {
|
||||
WMAddPopUpButtonItem(panel->wheelP, wheelActions[i]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user