mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
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>
This commit is contained in:
parent
57374fb9f0
commit
7e7cddde8a
1 changed files with 2 additions and 2 deletions
|
@ -1391,10 +1391,10 @@ void ProfileWidget2::changeGas()
|
||||||
|
|
||||||
// backup the things on the dataModel, since we will clear that out.
|
// backup the things on the dataModel, since we will clear that out.
|
||||||
struct gasmix gasmix;
|
struct gasmix gasmix;
|
||||||
int seconds = timeAxis->valueAt(scenePos);
|
qreal sec_val = timeAxis->valueAt(scenePos);
|
||||||
|
|
||||||
// no gas changes before the dive starts
|
// 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
|
// if there is a gas change at this time stamp, remove it before adding the new one
|
||||||
struct event *gasChangeEvent = current_dc->events;
|
struct event *gasChangeEvent = current_dc->events;
|
||||||
|
|
Loading…
Add table
Reference in a new issue