mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
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:
parent
3d7b2a2d7c
commit
67aec56f8c
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue