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
@@ -1111,7 +1111,7 @@ static void previewClick(XEvent * event, void *clientData)
|
||||
|
||||
switch (panel->oldTabItem) {
|
||||
case 0:
|
||||
for (i = 0; i < sizeof(previewPositions) / sizeof(previewPositions[0]); i++) {
|
||||
for (i = 0; i < wlengthof(previewPositions); i++) {
|
||||
if (event->xbutton.x >= previewPositions[i].pos.x
|
||||
&& event->xbutton.y >= previewPositions[i].pos.y
|
||||
&& event->xbutton.x < previewPositions[i].pos.x
|
||||
|
||||
Reference in New Issue
Block a user