Sqlite: Add swap for ConstIterator

Otherwise we get an recursion.

Change-Id: Ia8dfcbeae30b25d9d347404ae85b852c4c11c921
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Marco Bubke
2020-11-11 08:23:26 +01:00
parent 9d5ab6ef4b
commit 6fc3f65ce0

View File

@@ -147,13 +147,19 @@ public:
ConstIterator &operator=(ConstIterator &&other)
{
auto tmp = std::move(other);
std::swap(tmp, *this);
swap(tmp, *this);
return *this;
}
~ConstIterator();
friend void swap(ConstIterator &first, ConstIterator &second)
{
std::swap(first.m_sessionIterator, second.m_sessionIterator);
std::swap(first.m_state, second.m_state);
}
ConstIterator &operator++();
friend bool operator==(const ConstIterator &first, const ConstIterator &second)