diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2022-04-14 21:55:03 +0200 |
---|---|---|
committer | Sefa Eyeoglu <contact@scrumplex.net> | 2022-04-14 21:55:03 +0200 |
commit | 9fb5674233c21775fac76cf96cd2a77c4098e908 (patch) | |
tree | 45cb7670e2231424e70619ee6a54da908fd1dbe1 /launcher/modplatform/modrinth | |
parent | 18ac109e5abb86eebd254931efeea3630371a0bb (diff) | |
download | PrismLauncher-9fb5674233c21775fac76cf96cd2a77c4098e908.tar.gz PrismLauncher-9fb5674233c21775fac76cf96cd2a77c4098e908.tar.bz2 PrismLauncher-9fb5674233c21775fac76cf96cd2a77c4098e908.zip |
refactor: cleanup ModLoaderType
Diffstat (limited to 'launcher/modplatform/modrinth')
-rw-r--r-- | launcher/modplatform/modrinth/ModrinthAPI.h | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/launcher/modplatform/modrinth/ModrinthAPI.h b/launcher/modplatform/modrinth/ModrinthAPI.h index 711649d9..eefa4a85 100644 --- a/launcher/modplatform/modrinth/ModrinthAPI.h +++ b/launcher/modplatform/modrinth/ModrinthAPI.h @@ -51,25 +51,16 @@ class ModrinthAPI : public NetworkModAPI { return s; } - inline auto getModLoaderString(ModLoaderType modLoader) const -> QString + static auto getModLoaderString(ModLoaderType type) -> const QString { - switch (modLoader) { - case Any: - return "fabric, forge, quilt"; - case Forge: - return "forge"; - case Fabric: - return "fabric"; - case Quilt: - return "quilt"; - default: - return ""; - } + if (type == Unspecified) + return "fabric, forge, quilt"; + return ModAPI::getModLoaderString(type); } inline auto validateModLoader(ModLoaderType modLoader) const -> bool { - return modLoader == Any || modLoader == Forge || modLoader == Fabric || modLoader == Quilt; + return modLoader == Unspecified || modLoader == Forge || modLoader == Fabric || modLoader == Quilt; } }; |