diff options
-rw-r--r-- | core/planner.c | 2 | ||||
-rw-r--r-- | qt-models/diveplannermodel.cpp | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/core/planner.c b/core/planner.c index 9791523d2..614634f20 100644 --- a/core/planner.c +++ b/core/planner.c @@ -538,7 +538,7 @@ static void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool const unsigned int sz_temp = 100000; char *buffer = (char *)malloc(sz_buffer); char *temp = (char *)malloc(sz_temp); - char *deco, *segmentsymbol; + const char *deco, *segmentsymbol; static char buf[1000]; int len, lastdepth = 0, lasttime = 0, lastsetpoint = -1, newdepth = 0, lastprintdepth = 0, lastprintsetpoint = -1; struct gasmix lastprintgasmix = {{ -1 }, { -1 }}; diff --git a/qt-models/diveplannermodel.cpp b/qt-models/diveplannermodel.cpp index c35471a44..bd90e4dfb 100644 --- a/qt-models/diveplannermodel.cpp +++ b/qt-models/diveplannermodel.cpp @@ -873,7 +873,7 @@ void DivePlannerPointsModel::createPlan(bool replanCopy) setRecalc(oldRecalc); //TODO: C-based function here? - bool did_deco = plan(&diveplan, &cache, isPlanner(), true); + plan(&diveplan, &cache, isPlanner(), true); free(cache); if (!current_dive || displayed_dive.id != current_dive->id) { // we were planning a new dive, not re-planning an existing on @@ -896,8 +896,7 @@ void DivePlannerPointsModel::createPlan(bool replanCopy) QString oldnotes(current_dive->notes); if (oldnotes.indexOf(QString(disclaimer).left(40)) >= 0) oldnotes.truncate(oldnotes.indexOf(QString(displayed_dive.notes).left(40))); - if (did_deco) - oldnotes.append(displayed_dive.notes); + oldnotes.append(displayed_dive.notes); displayed_dive.notes = strdup(oldnotes.toUtf8().data()); } copy_dive(&displayed_dive, current_dive); |