From bfb54aa58194a35eacf649da35ec917ff8781266 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Tue, 14 May 2024 23:04:03 +0200 Subject: [PATCH] core: remove typedefs in pref.h Some compilers whine when using typedefs with non-C structs with default initializers. Not yet the case here, but in the future probably will. So remove them now. No point in C++ anyway. Signed-off-by: Berthold Stoeger --- core/pref.h | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/core/pref.h b/core/pref.h index 85d78afcf..0a144906c 100644 --- a/core/pref.h +++ b/core/pref.h @@ -5,8 +5,7 @@ #include "units.h" #include "taxonomy.h" -typedef struct -{ +struct partial_pressure_graphs_t { bool po2; bool pn2; bool phe; @@ -14,17 +13,17 @@ typedef struct double po2_threshold_max; double pn2_threshold; double phe_threshold; -} partial_pressure_graphs_t; +}; -typedef struct { +struct geocoding_prefs_t { enum taxonomy_category category[3]; -} geocoding_prefs_t; +}; -typedef struct { +struct locale_prefs_t { const char *language; const char *lang_locale; bool use_system_language; -} locale_prefs_t; +}; enum deco_mode { BUEHLMANN, @@ -39,18 +38,18 @@ enum def_file_behavior { CLOUD_DEFAULT_FILE }; -typedef struct { +struct update_manager_prefs_t { bool dont_check_for_updates; const char *last_version_used; int next_check; -} update_manager_prefs_t; +}; -typedef struct { +struct dive_computer_prefs_t { const char *vendor; const char *product; const char *device; const char *device_name; -} dive_computer_prefs_t; +}; // NOTE: these enums are duplicated in mobile-widgets/qmlinterface.h enum unit_system_values {