summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2015-03-13 02:32:51 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-03-14 18:17:43 -0700
commit7e7cddde8acc603159879ae34501debacbb9b222 (patch)
tree040fe808a70b97e58070c6ecb45ebc2a3c4fb99c /qt-ui
parent57374fb9f0377d257dc1f6f7ef56e49653ae3e29 (diff)
downloadsubsurface-7e7cddde8acc603159879ae34501debacbb9b222.tar.gz
Profile: fix a couple of warnings
profilewidget2.cpp:1398:25: warning: the omitted middle operand in ?: will always be 'true', suggest explicit middle operand [-Wparentheses] profilewidget2.cpp:1403:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/profile/profilewidget2.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp
index e314c337f..8e3641b66 100644
--- a/qt-ui/profile/profilewidget2.cpp
+++ b/qt-ui/profile/profilewidget2.cpp
@@ -1391,10 +1391,10 @@ void ProfileWidget2::changeGas()
// backup the things on the dataModel, since we will clear that out.
struct gasmix gasmix;
- int seconds = timeAxis->valueAt(scenePos);
+ qreal sec_val = timeAxis->valueAt(scenePos);
// no gas changes before the dive starts
- seconds = seconds > 0 ?: 0;
+ unsigned int seconds = (sec_val < 0.0) ? 0 : (unsigned int)sec_val;
// if there is a gas change at this time stamp, remove it before adding the new one
struct event *gasChangeEvent = current_dc->events;