From bf798390fa994106795717301e568edb6af71e09 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 3 Mar 2016 13:16:12 -0800 Subject: Avoid dangling else warnings Signed-off-by: Dirk Hohndel --- subsurface-core/subsurface-qt/DiveObjectHelper.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'subsurface-core/subsurface-qt/DiveObjectHelper.cpp') 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; } -- cgit v1.2.3-70-g09d2