QList: do not call std::swap directly; use ADL

Change-Id: Iaf6b965dd123f39436ba134ea1065d8dc4278c1e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Giuseppe D'Angelo 2019-04-30 09:44:18 +02:00
parent abd2cf3b0a
commit e0d2b50249

View File

@ -709,7 +709,8 @@ inline void QList<T>::swapItemsAt(int i, int j)
Q_ASSERT_X(i >= 0 && i < p.size() && j >= 0 && j < p.size(),
"QList<T>::swap", "index out of range");
detach();
std::swap(d->array[d->begin + i], d->array[d->begin + j]);
using std::swap;
swap(d->array[d->begin + i], d->array[d->begin + j]);
}
template <typename T>