Skip to content

Commit

Permalink
C++11 style for loop
Browse files Browse the repository at this point in the history
  • Loading branch information
Jojo-Schmitz committed May 25, 2016
1 parent 2a28f48 commit f42d1bf
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions mscore/menus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,19 +334,19 @@ Palette* MuseScore::newBarLinePalette(bool basic)
// bar line spans
struct {
int from, to;
const char* name;
} span[] = {
const char* userName;
} spans[] = {
{ BARLINE_SPAN_TICK1_FROM, BARLINE_SPAN_TICK1_TO, QT_TRANSLATE_NOOP("Palette", "Tick 1 span") },
{ BARLINE_SPAN_TICK2_FROM, BARLINE_SPAN_TICK2_TO, QT_TRANSLATE_NOOP("Palette", "Tick 2 span") },
{ BARLINE_SPAN_SHORT1_FROM,BARLINE_SPAN_SHORT1_TO,QT_TRANSLATE_NOOP("Palette", "Short 1 span") },
{ BARLINE_SPAN_SHORT2_FROM,BARLINE_SPAN_SHORT2_TO,QT_TRANSLATE_NOOP("Palette", "Short 2 span") },
};
for (unsigned i = 0; i < sizeof(span)/sizeof(*span); ++i) {
BarLine* b = new BarLine(gscore);
for (auto span : spans) {
BarLine* b = new BarLine(gscore);
b->setBarLineType(BarLineType::NORMAL);
b->setSpanFrom(span[i].from);
b->setSpanTo(span[i].to);
sp->append(b, qApp->translate("Palette", span[i].name));
b->setSpanFrom(span.from);
b->setSpanTo(span.to);
sp->append(b, qApp->translate("Palette", span.userName));
}
}
return sp;
Expand Down

0 comments on commit f42d1bf

Please sign in to comment.