replace - 1 with std::prev for QMap iterators#4371
Merged
uklotzde merged 1 commit intomixxxdj:mainfrom Oct 10, 2021
Merged
Conversation
9d34c16 to
fd22e9e
Compare
- 1 with -- for QMap iterators- 1 with std::prev for QMap iterators
QMap::iterator operator- was removed in Qt6. It has been added back in Qt 6.2 but with a deprecation warning saying to use std::prev instead: https://codereview.qt-project.org/c/qt/qtbase/+/362150
fd22e9e to
82b8846
Compare
Member
|
How about using QMap::last()? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
QMap::iterator operator- was removed in Qt6. It has been added
back in Qt 6.2 but with a deprecation warning saying to use
std::prev instead:
https://codereview.qt-project.org/c/qt/qtbase/+/362150