# HG changeset patch # User Teemu Piippo # Date 1638136403 -7200 # Node ID c68545f1aecb8daef7698da159f26909936aee16 # Parent e679dd5cd1591ec0549b4166a295f90218fe7257 Simplify ZandronumVersion structure diff -r e679dd5cd159 -r c68545f1aecb commonlib/types.h --- a/commonlib/types.h Sun Nov 28 23:47:55 2021 +0200 +++ b/commonlib/types.h Sun Nov 28 23:53:23 2021 +0200 @@ -24,17 +24,9 @@ struct ZandronumVersion { - ZandronumVersion (QString name, bool isRelease, QString binaryPath) : - name (name), - binaryPath (binaryPath), - isRelease (isRelease) {} - - ZandronumVersion() : - isRelease (false) {} - QString name; QString binaryPath; - bool isRelease; + bool isRelease = false; }; inline QDataStream& operator<< (QDataStream& out, const ZandronumVersion& version) diff -r e679dd5cd159 -r c68545f1aecb config/configwindow.cpp --- a/config/configwindow.cpp Sun Nov 28 23:47:55 2021 +0200 +++ b/config/configwindow.cpp Sun Nov 28 23:53:23 2021 +0200 @@ -202,7 +202,7 @@ ZandronumVersion VersionGuiEntry::toNonGuiVersion() const { - return ZandronumVersion (m_name, m_isRelease, m_pathItem->text()); + return {m_name, m_pathItem->text(), m_isRelease}; } // diff -r e679dd5cd159 -r c68545f1aecb launcher/prompts.cpp --- a/launcher/prompts.cpp Sun Nov 28 23:47:55 2021 +0200 +++ b/launcher/prompts.cpp Sun Nov 28 23:53:23 2021 +0200 @@ -69,7 +69,7 @@ void UnknownVersionPrompt::addBinary() { - ZandronumVersion version (m_binaryString, m_isRelease, ui->m_binaryPath->text()); + const ZandronumVersion version {m_binaryString, ui->m_binaryPath->text(), m_isRelease}; QList versions = Config::get ("versions").toList(); QVariant var; var.setValue (version);