From ab2cc42eeaf14f4f33d1883092c6e691fe6b1835 Mon Sep 17 00:00:00 2001 From: Michael Gregorius Date: Mon, 18 Dec 2017 21:01:01 +0100 Subject: [PATCH] Make Song::setModified more compact Implement a comment from a code review by pulling condition of the second if clause into the first one. --- src/core/Song.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/core/Song.cpp b/src/core/Song.cpp index 3fc16da4ae6..1d0e7ed2040 100644 --- a/src/core/Song.cpp +++ b/src/core/Song.cpp @@ -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(); } }