diff options
author | flow <flowlnlnln@gmail.com> | 2022-11-01 19:48:26 -0300 |
---|---|---|
committer | flow <flowlnlnln@gmail.com> | 2022-11-01 19:48:26 -0300 |
commit | 7956e6f04e32448b0043a49ff08873e117ba0a0b (patch) | |
tree | a451fa409e400f3c9cc27715df3be7abc2ca043e /launcher/BaseVersionList.cpp | |
parent | f6a3fa55b1fb4b10780065fd8e1df722cd40efd8 (diff) | |
download | PrismLauncher-7956e6f04e32448b0043a49ff08873e117ba0a0b.tar.gz PrismLauncher-7956e6f04e32448b0043a49ff08873e117ba0a0b.tar.bz2 PrismLauncher-7956e6f04e32448b0043a49ff08873e117ba0a0b.zip |
fix: don't use forward-declared Ptr types in meta/
This would cause ODR violations when those headers were included in
other places that also included stuff like "Version.h" (note the
"meta/Version.h"), which can cause problems, especially in LTO.
Signed-off-by: flow <flowlnlnln@gmail.com>
Diffstat (limited to 'launcher/BaseVersionList.cpp')
-rw-r--r-- | launcher/BaseVersionList.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/launcher/BaseVersionList.cpp b/launcher/BaseVersionList.cpp index b4a7d6dd..4ed82612 100644 --- a/launcher/BaseVersionList.cpp +++ b/launcher/BaseVersionList.cpp @@ -40,20 +40,20 @@ BaseVersionList::BaseVersionList(QObject *parent) : QAbstractListModel(parent) { } -BaseVersionPtr BaseVersionList::findVersion(const QString &descriptor) +BaseVersion::Ptr BaseVersionList::findVersion(const QString &descriptor) { for (int i = 0; i < count(); i++) { if (at(i)->descriptor() == descriptor) return at(i); } - return BaseVersionPtr(); + return nullptr; } -BaseVersionPtr BaseVersionList::getRecommended() const +BaseVersion::Ptr BaseVersionList::getRecommended() const { if (count() <= 0) - return BaseVersionPtr(); + return nullptr; else return at(0); } @@ -66,7 +66,7 @@ QVariant BaseVersionList::data(const QModelIndex &index, int role) const if (index.row() > count()) return QVariant(); - BaseVersionPtr version = at(index.row()); + BaseVersion::Ptr version = at(index.row()); switch (role) { |