Skip to content

Commit

Permalink
Make Song::setModified more compact
Browse files Browse the repository at this point in the history
Implement a comment from a code review by pulling condition of the
second if clause into the first one.
  • Loading branch information
michaelgregorius committed Dec 25, 2017
1 parent 9acff89 commit ab2cc42
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/core/Song.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -453,13 +453,10 @@ void Song::processAutomations(const TrackList &tracklist, MidiTime timeStart, fp

void Song::setModified(bool value)
{
if( !m_loadingProject )
if( !m_loadingProject && m_modified != value)
{
if (m_modified != value)
{
m_modified = value;
emit modified();
}
m_modified = value;
emit modified();
}
}

Expand Down

0 comments on commit ab2cc42

Please sign in to comment.