aboutsummaryrefslogtreecommitdiff
path: root/launcher/modplatform/ModIndex.cpp
diff options
context:
space:
mode:
authorflow <thiagodonato300@gmail.com>2022-04-19 21:10:12 -0300
committerflow <flowlnlnln@gmail.com>2022-05-23 14:43:07 -0300
commita99858c64d275303a9f91912a2732746ef6a3c8a (patch)
tree1ff9262c039b7d2addf7de4c3557c5c003556150 /launcher/modplatform/ModIndex.cpp
parentba50765c306d2907e411bc0ed9a10d990cf42fd3 (diff)
downloadPrismLauncher-a99858c64d275303a9f91912a2732746ef6a3c8a.tar.gz
PrismLauncher-a99858c64d275303a9f91912a2732746ef6a3c8a.tar.bz2
PrismLauncher-a99858c64d275303a9f91912a2732746ef6a3c8a.zip
refactor: move code out of ModIndex.h
Now it's in ModIndex.cpp
Diffstat (limited to 'launcher/modplatform/ModIndex.cpp')
-rw-r--r--launcher/modplatform/ModIndex.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/launcher/modplatform/ModIndex.cpp b/launcher/modplatform/ModIndex.cpp
new file mode 100644
index 00000000..eb8be992
--- /dev/null
+++ b/launcher/modplatform/ModIndex.cpp
@@ -0,0 +1,24 @@
+#include "modplatform/ModIndex.h"
+
+namespace ModPlatform{
+
+auto ProviderCapabilities::name(Provider p) -> const char*
+{
+ switch(p){
+ case Provider::MODRINTH:
+ return "modrinth";
+ case Provider::FLAME:
+ return "curseforge";
+ }
+}
+auto ProviderCapabilities::hashType(Provider p) -> QString
+{
+ switch(p){
+ case Provider::MODRINTH:
+ return "sha512";
+ case Provider::FLAME:
+ return "murmur2";
+ }
+}
+
+} // namespace ModPlatform