diff --git a/src/core/DataFile.cpp b/src/core/DataFile.cpp index c39e78296..8db694367 100644 --- a/src/core/DataFile.cpp +++ b/src/core/DataFile.cpp @@ -795,14 +795,13 @@ void DataFile::loadData( const QByteArray & _data, const QString & _sourceFile ) if( root.hasAttribute( "creatorversion" ) ) { - //compareType defaults to Build,so it doesn't have to be set here + // compareType defaults to Build,so it doesn't have to be set here ProjectVersion createdWith = root.attribute( "creatorversion" ); ProjectVersion openedWith = LMMS_VERSION;; - if (createdWith != openedWith) + if ( createdWith != openedWith ) { - //Only one compareType needs to be set, and "[The] ProjectVersion return type - //from the setCompareType(...) function [...] saves a few lines of code!" (@tresf) + // only one compareType needs to be set, and we can compare on one line because setCompareType returns ProjectVersion if ( createdWith.setCompareType(Minor) != openedWith) { if( Engine::hasGUI() ) @@ -818,7 +817,7 @@ void DataFile::loadData( const QByteArray & _data, const QString & _sourceFile ) } } - //The upgrade needs to happen after the warning as it updates the project version. + // the upgrade needs to happen after the warning as it updates the project version. if( createdWith.setCompareType(Build) < openedWith ) { upgrade();