diff options
author | Rachel Powers <508861+Ryex@users.noreply.github.com> | 2023-05-26 16:23:43 -0700 |
---|---|---|
committer | Rachel Powers <508861+Ryex@users.noreply.github.com> | 2023-05-26 16:23:43 -0700 |
commit | cf4df19986fe53357ef04b2a4407f69a2f4fa196 (patch) | |
tree | 2750dc9c35dd98fee709db4ab2b2d87280b54994 /launcher/modplatform/flame/FlameAPI.cpp | |
parent | c15603406907383c58786cb1dc235ac79c7f9626 (diff) | |
download | PrismLauncher-cf4df19986fe53357ef04b2a4407f69a2f4fa196.tar.gz PrismLauncher-cf4df19986fe53357ef04b2a4407f69a2f4fa196.tar.bz2 PrismLauncher-cf4df19986fe53357ef04b2a4407f69a2f4fa196.zip |
feat: display release type
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
Diffstat (limited to 'launcher/modplatform/flame/FlameAPI.cpp')
-rw-r--r-- | launcher/modplatform/flame/FlameAPI.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/launcher/modplatform/flame/FlameAPI.cpp b/launcher/modplatform/flame/FlameAPI.cpp index 0f26efef..ad3ab16a 100644 --- a/launcher/modplatform/flame/FlameAPI.cpp +++ b/launcher/modplatform/flame/FlameAPI.cpp @@ -144,9 +144,7 @@ auto FlameAPI::getLatestVersion(VersionSearchArgs&& args) -> ModPlatform::Indexe for (auto file : arr) { auto file_obj = Json::requireObject(file); auto file_tmp = FlameMod::loadIndexedPackVersion(file_obj); - bool better_release = true; - if (file_tmp.verison_type.has_value() && ver_tmp.verison_type.has_value()) - better_release = file_tmp.verison_type.value() < ver_tmp.verison_type.value(); + bool better_release = file_tmp.verison_type < ver_tmp.verison_type; if(file_tmp.date > ver_tmp.date && better_release) { ver_tmp = file_tmp; latest_file_obj = file_obj; |