Skip to content

Commit

Permalink
Merge pull request mixxxdj#11847 from daschuer/qt6-build-checks-fix
Browse files Browse the repository at this point in the history
Qt6: Use constInsert() template
  • Loading branch information
Swiftb0y authored Aug 21, 2023
2 parents 643e366 + d024bec commit dfde28d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/util/rangelist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <algorithm>

#include "util/assert.h"
#include "util/make_const_iterator.h"

namespace {

Expand Down Expand Up @@ -36,9 +37,9 @@ QList<int> parseRangeList(const QString& input) {
}
for (int currentIndex = startIndex; currentIndex <= endIndex; currentIndex++) {
// Add values sorted and skip duplicates
auto insertPos = std::lower_bound(intList.begin(), intList.end(), currentIndex);
if (insertPos == intList.end() || *insertPos != currentIndex) {
intList.insert(insertPos, currentIndex);
auto insertPos = std::lower_bound(intList.cbegin(), intList.cend(), currentIndex);
if (insertPos == intList.cend() || *insertPos != currentIndex) {
constInsert(&intList, insertPos, currentIndex);
}
}
}
Expand Down

0 comments on commit dfde28d

Please sign in to comment.