mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-04 04:44:16 +01:00
WPrefs: created macro 'wlengthof_nocheck' for the cases were wlengthof cannot be used
Because the macro wlengthof preforms a check of validity of its argument with static_assert, there is a use case where it fails with a compiler error. This patch introduces an alternate macro without the check, to be used only for this specific case. To be able to use the size of the array, a few of those array declaration have to be moved before the structure in which their size is used. Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
7d09b2c04f
commit
6ac27ba842
@@ -100,7 +100,7 @@ typedef struct _Panel {
|
||||
|
||||
WMWidget *parent;
|
||||
|
||||
WMButton *swi[sizeof(expert_options) / sizeof(expert_options[0])];
|
||||
WMButton *swi[wlengthof_nocheck(expert_options)];
|
||||
|
||||
} _Panel;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user