mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
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>
This commit is contained in:
parent
c463da3fac
commit
bbb55b2973
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue