QDuplicateTracker: remove the appendTo && overload
As a requirement for unordered_set (and QSet) both "iterator" and "const_iterator" are const, so we cannot reassign or move the key. That means this overload is no different to the const & overload, so we can just remove it. Change-Id: Ia14dccf7f610967649bab38161ce6d963509316b Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> (cherry picked from commit c19695ab953c979f15bbc72c4f4a453e9a114cf6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
3053bc172b
commit
62eb969d38
@ -101,18 +101,11 @@ public:
|
||||
}
|
||||
|
||||
template <typename C>
|
||||
void appendTo(C &c) const &
|
||||
void appendTo(C &c) const
|
||||
{
|
||||
for (const auto &e : set)
|
||||
c.push_back(e);
|
||||
}
|
||||
|
||||
template <typename C>
|
||||
void appendTo(C &c) &&
|
||||
{
|
||||
for (auto &e : set)
|
||||
c.push_back(std::move(e));
|
||||
}
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
Loading…
x
Reference in New Issue
Block a user