diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2021-03-02 10:54:36 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2021-04-02 13:53:23 -0700 |
commit | 11c54b85f6f6c567e5a9f6e6e537eace49ee6666 (patch) | |
tree | f052f43717b47f8ae3bb9a987d550a33eb33b8a9 /profile-widget/ruleritem.h | |
parent | a0f6b4d0b40aa61f670bb2eee1c898b1942dd42d (diff) | |
download | subsurface-11c54b85f6f6c567e5a9f6e6e537eace49ee6666.tar.gz |
planner: split DivePlannerPointsModel::remove() in two
There are two cases in this function: with and without holding
the control-key. The former deletes one point, the latter all
points starting with the selected point to the end.
The code was interlaced making it very hard to reason about.
Notably, it was buggy: with control, all points could be
deleted, leading to a crash.
Split the function in two versions, with their own bound
checking. This produces a bit of duplicate code, which
might be broken out later.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'profile-widget/ruleritem.h')
0 files changed, 0 insertions, 0 deletions