Replace qswap with std::swap

Fixes obsolete function 'qSwap' called. It is recommended to use 'std::swap'
instead. (CWE-477)
This commit is contained in:
Willyanto Willyanto 2023-01-16 23:44:25 +07:00
parent bf0260642b
commit 0a0f0c76db
2 changed files with 3 additions and 3 deletions

View file

@ -120,7 +120,7 @@ void DolphinTabPage::setSplitViewEnabled(bool enabled, Animated animated, const
// If the primary view is active, we have to swap the pointers
// because the secondary view will be the new primary view.
qSwap(m_primaryViewContainer, m_secondaryViewContainer);
std::swap(m_primaryViewContainer, m_secondaryViewContainer);
m_primaryViewActive = false;
}
} else {
@ -132,7 +132,7 @@ void DolphinTabPage::setSplitViewEnabled(bool enabled, Animated animated, const
// If the secondary view is active, we have to swap the pointers
// because the secondary view will be the new primary view.
qSwap(m_primaryViewContainer, m_secondaryViewContainer);
std::swap(m_primaryViewContainer, m_secondaryViewContainer);
m_primaryViewActive = true;
}
}

View file

@ -100,7 +100,7 @@ static void merge(RandomAccessIterator begin,
if (len1 + len2 == 2) {
if (lessThan(*(begin + 1), *(begin))) {
qSwap(*begin, *(begin + 1));
std::swap(*begin, *(begin + 1));
}
return;
}