mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
planner: remove unnecessary clearing of dive plan
I don't get the point of these calls to dp.clear(). The plan is overwritten immediately afterwards anyway. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
8704a8b6f9
commit
74c8bd34a0
1 changed files with 0 additions and 5 deletions
|
@ -1270,7 +1270,6 @@ void DivePlannerPointsModel::computeVariations(std::unique_ptr<struct diveplan>
|
||||||
if (my_instance != instanceCounter)
|
if (my_instance != instanceCounter)
|
||||||
return;
|
return;
|
||||||
plan(&ds, plan_copy, dive.get(), dcNr, 1, original, cache, true, false);
|
plan(&ds, plan_copy, dive.get(), dcNr, 1, original, cache, true, false);
|
||||||
plan_copy.dp.clear();
|
|
||||||
save.restore(&ds, false);
|
save.restore(&ds, false);
|
||||||
|
|
||||||
cloneDiveplan(*original_plan, plan_copy);
|
cloneDiveplan(*original_plan, plan_copy);
|
||||||
|
@ -1279,7 +1278,6 @@ void DivePlannerPointsModel::computeVariations(std::unique_ptr<struct diveplan>
|
||||||
if (my_instance != instanceCounter)
|
if (my_instance != instanceCounter)
|
||||||
return;
|
return;
|
||||||
plan(&ds, plan_copy, dive.get(), dcNr, 1, deeper, cache, true, false);
|
plan(&ds, plan_copy, dive.get(), dcNr, 1, deeper, cache, true, false);
|
||||||
plan_copy.dp.clear();
|
|
||||||
save.restore(&ds, false);
|
save.restore(&ds, false);
|
||||||
|
|
||||||
second_to_last(plan_copy.dp).depth.mm -= delta_depth.mm;
|
second_to_last(plan_copy.dp).depth.mm -= delta_depth.mm;
|
||||||
|
@ -1287,7 +1285,6 @@ void DivePlannerPointsModel::computeVariations(std::unique_ptr<struct diveplan>
|
||||||
if (my_instance != instanceCounter)
|
if (my_instance != instanceCounter)
|
||||||
return;
|
return;
|
||||||
plan(&ds, plan_copy, dive.get(), dcNr, 1, shallower, cache, true, false);
|
plan(&ds, plan_copy, dive.get(), dcNr, 1, shallower, cache, true, false);
|
||||||
plan_copy.dp.clear();
|
|
||||||
save.restore(&ds, false);
|
save.restore(&ds, false);
|
||||||
|
|
||||||
cloneDiveplan(*original_plan, plan_copy);
|
cloneDiveplan(*original_plan, plan_copy);
|
||||||
|
@ -1295,14 +1292,12 @@ void DivePlannerPointsModel::computeVariations(std::unique_ptr<struct diveplan>
|
||||||
if (my_instance != instanceCounter)
|
if (my_instance != instanceCounter)
|
||||||
return;
|
return;
|
||||||
plan(&ds, plan_copy, dive.get(), dcNr, 1, longer, cache, true, false);
|
plan(&ds, plan_copy, dive.get(), dcNr, 1, longer, cache, true, false);
|
||||||
plan_copy.dp.clear();
|
|
||||||
save.restore(&ds, false);
|
save.restore(&ds, false);
|
||||||
|
|
||||||
plan_copy.dp.back().time -= delta_time.seconds;
|
plan_copy.dp.back().time -= delta_time.seconds;
|
||||||
if (my_instance != instanceCounter)
|
if (my_instance != instanceCounter)
|
||||||
return;
|
return;
|
||||||
plan(&ds, plan_copy, dive.get(), dcNr, 1, shorter, cache, true, false);
|
plan(&ds, plan_copy, dive.get(), dcNr, 1, shorter, cache, true, false);
|
||||||
plan_copy.dp.clear();
|
|
||||||
save.restore(&ds, false);
|
save.restore(&ds, false);
|
||||||
|
|
||||||
char buf[200];
|
char buf[200];
|
||||||
|
|
Loading…
Reference in a new issue