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

LoopingControl: use auto instead of auto* for iterator #4379

Merged
merged 1 commit into from
Oct 12, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/engine/controls/loopingcontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1124,7 +1124,11 @@ void LoopingControl::slotBeatLoopDeactivate(BeatLoopingControl* pBeatLoopControl
void LoopingControl::slotBeatLoopDeactivateRoll(BeatLoopingControl* pBeatLoopControl) {
pBeatLoopControl->deactivate();
const double size = pBeatLoopControl->getSize();
auto* i = m_activeLoopRolls.begin();
// clang-tidy wants auto to be auto* because QStack inherits from QVector
// and QVector::iterator is a pointer type in Qt5, but QStack inherits
// from QList in Qt6 so QStack::iterator is not a pointer type in Qt6.
// NOLINTNEXTLINE(readability-qualified-auto)
auto i = m_activeLoopRolls.begin();
while (i != m_activeLoopRolls.end()) {
if (size == *i) {
i = m_activeLoopRolls.erase(i);
Expand Down