Fix AppleClang -Wrange-loop-analysis warnings

This commit is contained in:
Luke Street 2021-03-05 09:26:26 -05:00
parent df7136d265
commit 217e791b88
3 changed files with 3 additions and 3 deletions

View File

@ -519,7 +519,7 @@ void LayersTableView::deleteSelection() {
std::vector<std::pair<amuse::LayerMapping, int>> data;
data.reserve(list.size());
for (const QModelIndex idx : list) {
for (const QModelIndex& idx : list) {
data.emplace_back(amuse::LayerMapping{}, idx.row());
}

View File

@ -1172,7 +1172,7 @@ void PageTableView::deleteSelection() {
std::vector<std::pair<uint8_t, amuse::SongGroupIndex::PageEntry>> data;
data.reserve(list.size());
for (const QModelIndex idx : list) {
for (const QModelIndex& idx : list) {
data.emplace_back(model()->data(idx).toInt() - 1, amuse::SongGroupIndex::PageEntry{});
}

View File

@ -243,7 +243,7 @@ CommandWidget::CommandWidget(QWidget* parent, amuse::SoundMacro::ICmd* cmd, amus
cb->setFixedHeight(30);
cb->setProperty("fieldIndex", f);
cb->setProperty("fieldName", fieldName);
for (const auto choice : field.m_choices) {
for (const auto& choice : field.m_choices) {
if (choice.empty()) {
break;
}