filter: make filter_preset_table an opaque struct for C code

filter_preset_table_t was defined as "void" for C code.
However, that meant that any pointer could be passed as
such a table and such a table could be passed as any pointer,
without generating compiler warnings.

Indeed, we had a parameter-mixup that went unnoticed.

Therefore, make filter_preset_t an anonymous structure with
the name filter_preset instead.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2020-10-17 09:49:39 +02:00 committed by Dirk Hohndel
parent 3d7b2a2d7c
commit 67aec56f8c

View file

@ -28,7 +28,8 @@ using filter_preset_table_t = std::vector<filter_preset>;
extern filter_preset_table_t filter_preset_table;
#else
struct filter_preset;
typedef void filter_preset_table_t;
struct filter_preset_table;
typedef struct filter_preset_table filter_preset_table_t;
#endif