Browse Source

Don't use deprecated QSet::iterator::operator+(int)

adaptive-webui-19844
Chocobo1 5 years ago
parent
commit
9c330812cc
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 4
      src/base/algorithm.h

4
src/base/algorithm.h

@ -54,7 +54,7 @@ namespace Algorithm
{ {
auto it = dict.begin(); auto it = dict.begin();
while (it != dict.end()) while (it != dict.end())
it = (p(it.key(), it.value()) ? dict.erase(it) : (it + 1)); it = (p(it.key(), it.value()) ? dict.erase(it) : ++it);
} }
// To be used with set types, such as QSet, std::set // To be used with set types, such as QSet, std::set
@ -64,6 +64,6 @@ namespace Algorithm
{ {
auto it = set.begin(); auto it = set.begin();
while (it != set.end()) while (it != set.end())
it = (p(*it) ? set.erase(it) : (it + 1)); it = (p(*it) ? set.erase(it) : ++it);
} }
} }

Loading…
Cancel
Save