From e8af3e8d3cec38157339b6ee5b2104f9bfd09c0e Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Mon, 5 Aug 2019 23:03:40 +0200 Subject: [PATCH] Simplify if statement --- src/collection/collectionmodel.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/collection/collectionmodel.cpp b/src/collection/collectionmodel.cpp index 4b795e1ab..fcb7efe1f 100644 --- a/src/collection/collectionmodel.cpp +++ b/src/collection/collectionmodel.cpp @@ -1365,8 +1365,7 @@ QString CollectionModel::PrettyYearAlbum(const int year, const QString &album) { QString CollectionModel::PrettyAlbumDisc(const QString &album, const int disc) { - if (disc <= 0) return TextOrUnknown(album); - else if (album.contains(QRegExp(Song::kAlbumRemoveDisc))) return TextOrUnknown(album); + if (disc <= 0 || album.contains(QRegExp(Song::kAlbumRemoveDisc))) return TextOrUnknown(album); else return TextOrUnknown(album) + " - (Disc " + QString::number(disc) + ")"; }