From 605e1e19ed0c52a16580c95e36ae79e71b539351 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Fri, 17 Aug 2018 00:58:30 +0200 Subject: Cleanup: const-ify functions taking pointers to events This is another entry in the series to make more things "const-clean" with the ultimate goal of merge_dive() take const pointers. This concerns functions taking pointers to events and the fallout from making these const. The somewhat debatable part of this commit might be that get_next_event() is split in a two distinct (const and non-const) versions with different names, since C doesn't allow overloading. The linker should recognize that these functions are identical and remove one of them. 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 6f783b104..32231ecca 100644 --- a/qt-models/diveplannermodel.cpp +++ b/qt-models/diveplannermodel.cpp @@ -81,7 +81,7 @@ void DivePlannerPointsModel::loadFromDive(dive *d) o2pressure_t last_sp; bool oldRec = recalc; struct divecomputer *dc = &(d->dc); - struct event *evd = NULL; + const struct event *evd = NULL; enum divemode_t current_divemode = UNDEF_COMP_TYPE; recalc = false; CylindersModel::instance()->updateDive(); -- cgit v1.2.3-70-g09d2