From 39bd04f06ff42623f7349096d707c4a877fc7cd7 Mon Sep 17 00:00:00 2001 From: flow Date: Sun, 6 Mar 2022 16:45:39 -0300 Subject: refactor: use Enum instead of raw int for ModLoaderType --- launcher/modplatform/flame/FlameAPI.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'launcher/modplatform/flame') diff --git a/launcher/modplatform/flame/FlameAPI.h b/launcher/modplatform/flame/FlameAPI.h index 6e2b9e25..b49aeb24 100644 --- a/launcher/modplatform/flame/FlameAPI.h +++ b/launcher/modplatform/flame/FlameAPI.h @@ -4,7 +4,8 @@ class FlameAPI : public ModAPI { public: - inline QString getModSearchURL(int index, QString searchFilter, QString sort, bool fabricCompatible, QString version) const override + + inline QString getModSearchURL(int index, QString searchFilter, QString sort, ModLoaderType modLoader, QString version) const override { return QString("https://addons-ecs.forgesvc.net/api/v2/addon/search?" "gameId=432&" "categoryId=0&" "sectionId=6&" @@ -14,7 +15,7 @@ class FlameAPI : public ModAPI { .arg(index) .arg(searchFilter) .arg(sort) - .arg(fabricCompatible ? 4 : 1) // Enum: https://docs.curseforge.com/?http#tocS_ModLoaderType + .arg(modLoader) .arg(version); }; -- cgit