summaryrefslogtreecommitdiffstats
path: root/qt-models/diveplannermodel.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2021-02-23 20:43:17 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2021-04-02 13:53:23 -0700
commit7b9c8e344a490333196c34fe87235146872b662e (patch)
tree42da92a16af4b272af03ecfb96be607be2aef1b1 /qt-models/diveplannermodel.cpp
parent4009d4c87f3a12a052f14b8a024e5b9f58140d25 (diff)
downloadsubsurface-7b9c8e344a490333196c34fe87235146872b662e.tar.gz
cleanup: unify whitespace in switch statement
The way the blocks in DivePlannerPointsModel::setData()'s switch statement were demarked messed with my mind. There were at least three variants. Let's try to be consistent. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models/diveplannermodel.cpp')
-rw-r--r--qt-models/diveplannermodel.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/qt-models/diveplannermodel.cpp b/qt-models/diveplannermodel.cpp
index 30ab063d2..ec83483f3 100644
--- a/qt-models/diveplannermodel.cpp
+++ b/qt-models/diveplannermodel.cpp
@@ -334,8 +334,7 @@ bool DivePlannerPointsModel::setData(const QModelIndex &index, const QVariant &v
cylinders.updateBestMixes();
}
break;
- case RUNTIME:
- {
+ case RUNTIME: {
int secs = value.toInt() * 60;
i = index.row();
int duration = secs;
@@ -348,10 +347,9 @@ bool DivePlannerPointsModel::setData(const QModelIndex &index, const QVariant &v
while (++i < divepoints.size())
if (divepoints[i].time < divepoints[i - 1].time + 10)
divepoints[i].time = divepoints[i - 1].time + 10;
- }
break;
- case DURATION:
- {
+ }
+ case DURATION: {
int secs = value.toInt() * 60;
if (!secs)
secs = 10;
@@ -362,14 +360,15 @@ bool DivePlannerPointsModel::setData(const QModelIndex &index, const QVariant &v
shift = divepoints[i].time - secs;
while (i < divepoints.size())
divepoints[i++].time -= shift;
- }
break;
+ }
case CCSETPOINT: {
int po2 = 0;
QByteArray gasv = value.toByteArray();
if (validate_po2(gasv.data(), &po2))
p.setpoint = po2;
- } break;
+ break;
+ }
case GAS:
if (value.toInt() >= 0)
p.cylinderid = value.toInt();
@@ -537,7 +536,7 @@ void DivePlannerPointsModel::setRebreatherMode(int mode)
{
int i;
d->dc.divemode = (divemode_t) mode;
- for (i=0; i < rowCount(); i++) {
+ for (i = 0; i < rowCount(); i++) {
divepoints[i].setpoint = mode == CCR ? prefs.defaultsetpoint : 0;
divepoints[i].divemode = (enum divemode_t) mode;
}