From e0c0ac5d5c7c218011278fbe57da291a7e10c8eb Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Mon, 12 May 2014 14:22:46 -0300 Subject: Rename getDiveById to get_dive_by_id to keep current c code organized. This commit renames getDiveById to get_dive_by_id, and it also removes the Q_ASSERTS and if(!dive) return that the callers of this function were calling. If it has a Q_ASSERT this means that the dive must exist, so checking for nullness was bogus too. I've changed the assert (done in a silly C-Way. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/profile/profilewidget2.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'qt-ui/profile/profilewidget2.cpp') diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp index 17eb2a3c4..d2d01a384 100644 --- a/qt-ui/profile/profilewidget2.cpp +++ b/qt-ui/profile/profilewidget2.cpp @@ -227,7 +227,7 @@ void ProfileWidget2::replot() { int diveId = dataModel->id(); dataModel->clear(); - plotDives(QList() << getDiveById(diveId)); + plotDives(QList() << get_dive_by_diveid(diveId)); } void ProfileWidget2::setupItemSizes() @@ -808,7 +808,7 @@ void ProfileWidget2::changeGas() int diveId = dataModel->id(); int o2, he; int seconds = timeAxis->valueAt(scenePos); - struct dive *d = getDiveById(diveId); + struct dive *d = get_dive_by_diveid(diveId); validate_gas(gas.toUtf8().constData(), &o2, &he); add_gas_switch_event(d, get_dive_dc(d, diveComputer), seconds, get_gasidx(d, o2, he)); -- cgit v1.2.3-70-g09d2