From bbb55b29737f1a818e50de646ff8acadf7190c76 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 26 Oct 2020 10:04:53 -0700 Subject: 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 Signed-off-by: Dirk Hohndel --- profile-widget/profilewidget2.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'profile-widget') 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; } } -- cgit v1.2.3-70-g09d2