aboutsummaryrefslogtreecommitdiffstats
path: root/profile-widget/profilewidget2.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2020-10-26 10:04:53 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-10-26 19:27:03 -0700
commitbbb55b29737f1a818e50de646ff8acadf7190c76 (patch)
tree0b4dcbcc8d842f9e1bdaec21c2f20336068a9eed /profile-widget/profilewidget2.cpp
parentc463da3faceb5e9d94e2378148fc39194dc9b5f0 (diff)
downloadsubsurface-bbb55b29737f1a818e50de646ff8acadf7190c76.tar.gz
cleanup: replace deprecated swap() usage
Instead of using the two different ways Qt supports swap, depending on the Qt version in use, let's simply use std::swap() Suggested-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'profile-widget/profilewidget2.cpp')
-rw-r--r--profile-widget/profilewidget2.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp
index 5b0bd8286..384826fe4 100644
--- a/profile-widget/profilewidget2.cpp
+++ b/profile-widget/profilewidget2.cpp
@@ -1822,12 +1822,12 @@ int ProfileWidget2::fixHandlerIndex(DiveHandler *activeHandler)
if (index > 0 && index < handles.count() - 1) {
DiveHandler *before = handles[index - 1];
if (before->pos().x() > activeHandler->pos().x()) {
- handles.swap(index, index - 1);
+ std::swap(handles[index], handles[index - 1]);
return index - 1;
}
DiveHandler *after = handles[index + 1];
if (after->pos().x() < activeHandler->pos().x()) {
- handles.swap(index, index + 1);
+ std::swap(handles[index], handles[index + 1]);
return index + 1;
}
}