Turn autogroup from short into bool

All users of autogroup are clearly expecting a boolean value, so
let the type reflect this.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2017-12-29 11:49:56 +01:00 committed by Dirk Hohndel
parent e414e0b334
commit 956cb53cd5
3 changed files with 3 additions and 3 deletions

View file

@ -525,7 +525,7 @@ static inline depth_t gas_mnd(struct gasmix *mix, depth_t end, struct dive *dive
#define SURFACE_THRESHOLD 750 /* somewhat arbitrary: only below 75cm is it really diving */ #define SURFACE_THRESHOLD 750 /* somewhat arbitrary: only below 75cm is it really diving */
extern short autogroup; extern bool autogroup;
/* random threashold: three days without diving -> new trip /* random threashold: three days without diving -> new trip
* this works very well for people who usually dive as part of a trip and don't * this works very well for people who usually dive as part of a trip and don't
* regularly dive at a local facility; this is why trips are an optional feature */ * regularly dive at a local facility; this is why trips are an optional feature */

View file

@ -49,7 +49,7 @@
static bool dive_list_changed = false; static bool dive_list_changed = false;
short autogroup = false; bool autogroup = false;
dive_trip_t *dive_trip_list; dive_trip_t *dive_trip_list;

View file

@ -833,7 +833,7 @@ static void parse_settings_autogroup(char *line, struct membuffer *str, void *_u
(void) line; (void) line;
(void) str; (void) str;
(void) _unused; (void) _unused;
set_autogroup(1); set_autogroup(true);
} }
static void parse_settings_units(char *line, struct membuffer *str, void *unused) static void parse_settings_units(char *line, struct membuffer *str, void *unused)