summaryrefslogtreecommitdiffstats
path: root/planner.c
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2014-07-05 13:37:49 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-07-05 07:43:10 -0700
commit79cd5ce83517749f221304ddf518f39c5d6d3532 (patch)
tree5677b64e034d8dedcc69e69c76861508493291c0 /planner.c
parentaafd918169322fc8bc35a750175063b260c55e67 (diff)
downloadsubsurface-79cd5ce83517749f221304ddf518f39c5d6d3532.tar.gz
Remove gasmix_is_null
The semantic of fo2==fhe==0 to mean "same gasmix as before" apparently is not used anywhere and gets in the way of the semantic "this is air". If there is really need for mix meaning "same as before", please use another value, e.g. one with a specific negative percentage. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'planner.c')
-rw-r--r--planner.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/planner.c b/planner.c
index 31ba3310c..768344caa 100644
--- a/planner.c
+++ b/planner.c
@@ -292,8 +292,6 @@ static void create_dive_from_plan(struct diveplan *diveplan, bool track_gas)
dp = dp->next;
continue;
}
- if (gasmix_is_null(&gasmix))
- gasmix = oldgasmix;
/* Check for SetPoint change */
if (oldpo2 != po2) {
@@ -566,11 +564,8 @@ static void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool
nextdp = dp->next;
while (nextdp && nextdp->time == 0)
nextdp = nextdp->next;
- if (nextdp) {
+ if (nextdp)
newgasmix = nextdp->gasmix;
- if (gasmix_is_null(&newgasmix))
- newgasmix = gasmix;
- }
/* do we want to skip this leg as it is devoid of anything useful? */
if (!dp->entered &&
gasmix_distance(&gasmix, &newgasmix) == 0 &&