diff options
author | Sky <git@bunnies.cc> | 2013-10-06 01:13:20 +0100 |
---|---|---|
committer | Sky <git@bunnies.cc> | 2013-10-06 01:13:20 +0100 |
commit | 7aeea14a027f8cf28615f73f4fda1ffffc2cdc3c (patch) | |
tree | 53ea703d11a525442d6ebf575bd22f840c5b4e8d /logic/lists/MinecraftVersionList.cpp | |
parent | 2398acc9e490ce124aa621c19156c89ef87591f1 (diff) | |
parent | f83119ce7ec3d11a903901b8eff762d2b0a9f635 (diff) | |
download | MultiMC-7aeea14a027f8cf28615f73f4fda1ffffc2cdc3c.tar MultiMC-7aeea14a027f8cf28615f73f4fda1ffffc2cdc3c.tar.gz MultiMC-7aeea14a027f8cf28615f73f4fda1ffffc2cdc3c.tar.lz MultiMC-7aeea14a027f8cf28615f73f4fda1ffffc2cdc3c.tar.xz MultiMC-7aeea14a027f8cf28615f73f4fda1ffffc2cdc3c.zip |
Merge branch 'develop' of https://github.com/MultiMC/MultiMC5 into develop
Diffstat (limited to 'logic/lists/MinecraftVersionList.cpp')
-rw-r--r-- | logic/lists/MinecraftVersionList.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/logic/lists/MinecraftVersionList.cpp b/logic/lists/MinecraftVersionList.cpp index 35f7251e..36611165 100644 --- a/logic/lists/MinecraftVersionList.cpp +++ b/logic/lists/MinecraftVersionList.cpp @@ -16,8 +16,6 @@ #include "MinecraftVersionList.h" #include <MultiMC.h> -#include <QDebug> - #include <QtXml> #include <QJsonDocument> @@ -62,8 +60,8 @@ int MinecraftVersionList::count() const bool cmpVersions(BaseVersionPtr first, BaseVersionPtr second) { - auto left = first.dynamicCast<MinecraftVersion>(); - auto right = second.dynamicCast<MinecraftVersion>(); + auto left = std::dynamic_pointer_cast<MinecraftVersion>(first); + auto right = std::dynamic_pointer_cast<MinecraftVersion>(second); return left->timestamp > right->timestamp; } @@ -78,7 +76,7 @@ BaseVersionPtr MinecraftVersionList::getLatestStable() const { for (int i = 0; i < m_vlist.length(); i++) { - auto ver = m_vlist.at(i).dynamicCast<MinecraftVersion>(); + auto ver =std::dynamic_pointer_cast<MinecraftVersion>(m_vlist.at(i)); if (ver->is_latest && !ver->is_snapshot) { return m_vlist.at(i); @@ -272,7 +270,7 @@ void MCVListLoadTask::list_downloaded() QString dlUrl = QString(MCVLIST_URLBASE) + versionID + "/"; // Now, we construct the version object and add it to the list. - QSharedPointer<MinecraftVersion> mcVersion(new MinecraftVersion()); + std::shared_ptr<MinecraftVersion> mcVersion(new MinecraftVersion()); mcVersion->m_name = mcVersion->m_descriptor = versionID; mcVersion->timestamp = versionTime.toMSecsSinceEpoch(); mcVersion->download_url = dlUrl; |