Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace - 1 with std::prev for QMap iterators #4371

Merged
merged 1 commit into from
Oct 10, 2021

Conversation

Be-ing
Copy link
Contributor

@Be-ing Be-ing commented Oct 10, 2021

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

@Be-ing Be-ing force-pushed the qhashiterator_minus branch 2 times, most recently from 9d34c16 to fd22e9e Compare October 10, 2021 03:40
@Be-ing Be-ing changed the title replace - 1 with -- for QMap iterators replace - 1 with std::prev for QMap iterators Oct 10, 2021
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
@Be-ing Be-ing force-pushed the qhashiterator_minus branch from fd22e9e to 82b8846 Compare October 10, 2021 04:24
Copy link
Contributor

@uklotzde uklotzde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! LGTM

@uklotzde uklotzde merged commit 2e8f321 into mixxxdj:main Oct 10, 2021
@Be-ing Be-ing deleted the qhashiterator_minus branch October 10, 2021 13:22
@daschuer
Copy link
Member

How about using QMap::last()?
That would improve t readability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants