diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2016-03-23 09:53:44 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-03-23 09:53:44 -0700 |
commit | 22c94a3e6596f04c86d102098e542a88502410a9 (patch) | |
tree | 0f75bc7b44a7fe249c3bf4a359d3c91cb179d4aa /subsurface-core/dive.h | |
parent | e93c99c8bc9c7ebcc39aa8be16476a794a845636 (diff) | |
download | subsurface-22c94a3e6596f04c86d102098e542a88502410a9.tar.gz |
Don't try to force depth to be unsigned
Trying to clean up the signed vs. unsigned issues it becomes clear that
forcing depth to be unsigned causes way too many problems in the code.
So this commit goes the opposite direction; since we clearly aren't
limited INT_MAX vs UINT_MAX, simply make more of the depth related
variables signed.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'subsurface-core/dive.h')
-rw-r--r-- | subsurface-core/dive.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/subsurface-core/dive.h b/subsurface-core/dive.h index 484a67f8a..d52ef5272 100644 --- a/subsurface-core/dive.h +++ b/subsurface-core/dive.h @@ -793,7 +793,6 @@ extern void subsurface_command_line_exit(int *, char ***); extern void add_segment(double pressure, const struct gasmix *gasmix, int period_in_seconds, int setpoint, const struct dive *dive, int sac); extern void clear_deco(double surface_pressure); extern void dump_tissues(void); -extern unsigned int deco_allowed_depth(double tissues_tolerance, double surface_pressure, struct dive *dive, bool smooth); extern void set_gf(short gflow, short gfhigh, bool gf_low_at_maxdepth); extern void cache_deco_state(char **datap); extern void restore_deco_state(char *data); @@ -805,7 +804,7 @@ extern double tissue_tolerance_calc(const struct dive *dive, double pressure); /* this should be converted to use our types */ struct divedatapoint { int time; - unsigned int depth; + int depth; struct gasmix gasmix; int setpoint; bool entered; @@ -893,7 +892,7 @@ extern depth_t string_to_depth(const char *str); extern pressure_t string_to_pressure(const char *str); extern volume_t string_to_volume(const char *str, pressure_t workp); extern fraction_t string_to_fraction(const char *str); -extern void average_max_depth(struct diveplan *dive, unsigned int *avg_depth, unsigned int *max_depth); +extern void average_max_depth(struct diveplan *dive, int *avg_depth, int *max_depth); #include "pref.h" |