Skip to content

Commit

Permalink
Remove duplicating if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
lpugin committed Jan 6, 2025
1 parent 7dea440 commit 7bafbe8
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/alignfunctor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -655,11 +655,8 @@ FunctorCode AlignVerticallyFunctor::VisitStaff(Staff *staff)
const int verseNumber = verse->GetN();
const data_STAFFREL versePlace = verse->GetPlace();
const bool verseCollapse = m_doc->GetOptions()->m_lyricVerseCollapse.GetValue();
if ((versePlace == STAFFREL_above) && !alignment->GetVersePositionAbove(verseNumber, verseCollapse)) {
alignment->AddVerseN(verseNumber, verse->GetPlace());
}
if ((versePlace != STAFFREL_above) && !alignment->GetVersePositionBelow(verseNumber, verseCollapse)) {
alignment->AddVerseN(verseNumber, verse->GetPlace());
if (!alignment->GetVersePositionAbove(verseNumber, verseCollapse)) {
alignment->AddVerseN(verseNumber, versePlace);
}
}
}
Expand Down

0 comments on commit 7bafbe8

Please sign in to comment.