diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2016-03-03 13:16:12 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-03-03 14:29:19 -0800 |
commit | bf798390fa994106795717301e568edb6af71e09 (patch) | |
tree | 72fd0099e4297acc9f904721f680e71d4ea58718 | |
parent | a173a3ce79de6b53d7871cba8acfa1f07565d829 (diff) | |
download | subsurface-bf798390fa994106795717301e568edb6af71e09.tar.gz |
Avoid dangling else warnings
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | subsurface-core/subsurface-qt/DiveObjectHelper.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/subsurface-core/subsurface-qt/DiveObjectHelper.cpp b/subsurface-core/subsurface-qt/DiveObjectHelper.cpp index 4a43f6f8b..ab88d2f3c 100644 --- a/subsurface-core/subsurface-qt/DiveObjectHelper.cpp +++ b/subsurface-core/subsurface-qt/DiveObjectHelper.cpp @@ -37,16 +37,18 @@ static QString getPressures(struct dive *dive, enum returnPressureSelector ret) { cylinder_t *cyl = &dive->cylinder[0]; QString fmt; - if (ret == START_PRESSURE) + if (ret == START_PRESSURE) { if (cyl->start.mbar) fmt = get_pressure_string(cyl->start, true); else if (cyl->sample_start.mbar) fmt = get_pressure_string(cyl->sample_start, true); - if (ret == END_PRESSURE) + } + if (ret == END_PRESSURE) { if (cyl->end.mbar) fmt = get_pressure_string(cyl->end, true); else if(cyl->sample_end.mbar) fmt = get_pressure_string(cyl->sample_end, true); + } return fmt; } |