summaryrefslogtreecommitdiffstats
path: root/libmultimc/src/minecraftversionlist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libmultimc/src/minecraftversionlist.cpp')
-rw-r--r--libmultimc/src/minecraftversionlist.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/libmultimc/src/minecraftversionlist.cpp b/libmultimc/src/minecraftversionlist.cpp
index abbae991..bb8b0f7a 100644
--- a/libmultimc/src/minecraftversionlist.cpp
+++ b/libmultimc/src/minecraftversionlist.cpp
@@ -92,6 +92,17 @@ void MinecraftVersionList::sort()
endResetModel();
}
+InstVersion *MinecraftVersionList::getLatestStable() const
+{
+ for (int i = 0; i < m_vlist.length(); i++)
+ {
+ if (((MinecraftVersion *)m_vlist.at(i))->versionType() == MinecraftVersion::CurrentStable)
+ {
+ return m_vlist.at(i);
+ }
+ }
+}
+
MinecraftVersionList &MinecraftVersionList::getMainList()
{
return mcVList;