From 642d9c80b3597ab512fe937f05e08c10580c06dd Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Fri, 12 Feb 2021 18:19:24 +0100 Subject: planner: pass in_planner argument to decoMode() To remove reliance on global state, pass an "in_planner" argument to decoMode(). Thus, calls to in_planner() can be removed. This is a more-or-less automated change. Ultimately it would probably be better to pass the current deco-mode to the affected functions instead of calling decoMode() with an in_planner parameter. Signed-off-by: Berthold Stoeger --- qt-models/diveplannermodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qt-models') diff --git a/qt-models/diveplannermodel.cpp b/qt-models/diveplannermodel.cpp index 54f46111d..7301e8d07 100644 --- a/qt-models/diveplannermodel.cpp +++ b/qt-models/diveplannermodel.cpp @@ -1118,7 +1118,7 @@ void DivePlannerPointsModel::computeVariations(struct diveplan *original_plan, c struct divedatapoint *last_segment; struct deco_state ds = *previous_ds; - if (isPlanner() && prefs.display_variations && decoMode() != RECREATIONAL) { + if (isPlanner() && prefs.display_variations && decoMode(true) != RECREATIONAL) { int my_instance = ++instanceCounter; cache_deco_state(&ds, &save); -- cgit v1.2.3-70-g09d2