diff options
Diffstat (limited to 'src/shared/qtgradienteditor/qtgradientstopsmodel.cpp')
-rw-r--r-- | src/shared/qtgradienteditor/qtgradientstopsmodel.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/shared/qtgradienteditor/qtgradientstopsmodel.cpp b/src/shared/qtgradienteditor/qtgradientstopsmodel.cpp index 0afbf49bb..2422926c4 100644 --- a/src/shared/qtgradienteditor/qtgradientstopsmodel.cpp +++ b/src/shared/qtgradienteditor/qtgradientstopsmodel.cpp @@ -418,17 +418,12 @@ void QtGradientStopsModel::clearSelection() selectStop(stop, false); } -namespace { - template <typename BidirectionalIterator> - std::reverse_iterator<BidirectionalIterator> rev(BidirectionalIterator it) - { return std::reverse_iterator<BidirectionalIterator>(it); } -} - void QtGradientStopsModel::flipAll() { QMap<qreal, QtGradientStop *> stopsMap = stops(); QMap<QtGradientStop *, bool> swappedList; - for (auto itStop = rev(stopsMap.keyValueEnd()), end = rev(stopsMap.keyValueBegin()); itStop != end; ++itStop) { + for (auto itStop = stopsMap.keyValueEnd(), begin = stopsMap.keyValueBegin(); itStop != begin;) { + --itStop; QtGradientStop *stop = (*itStop).second; if (swappedList.contains(stop)) continue; |