chore: improve readability

Co-authored-by: flow <thiagodonato300@gmail.com>
This commit is contained in:
Sefa Eyeoglu 2022-05-19 12:35:44 +02:00
parent 943090db98
commit 36045a8b0a
No known key found for this signature in database
GPG Key ID: C10411294912A422

View File

@ -33,12 +33,12 @@ class ModrinthAPI : public NetworkModAPI {
QStringList l; QStringList l;
for (auto loader : {Forge, Fabric, Quilt}) for (auto loader : {Forge, Fabric, Quilt})
{ {
if (types & loader || types == Unspecified) if ((types & loader) || types == Unspecified)
{ {
l << ModAPI::getModLoaderString(loader); l << ModAPI::getModLoaderString(loader);
} }
} }
if (types & Quilt && ~types & Fabric) // Add Fabric if Quilt is in use, if Fabric isn't already there if ((types & Quilt) && (~types & Fabric)) // Add Fabric if Quilt is in use, if Fabric isn't already there
l << ModAPI::getModLoaderString(Fabric); l << ModAPI::getModLoaderString(Fabric);
return l; return l;
} }
@ -98,7 +98,7 @@ class ModrinthAPI : public NetworkModAPI {
inline auto validateModLoaders(ModLoaderTypes loaders) const -> bool inline auto validateModLoaders(ModLoaderTypes loaders) const -> bool
{ {
return loaders == Unspecified || loaders & (Forge | Fabric | Quilt); return (loaders == Unspecified) || (loaders & (Forge | Fabric | Quilt));
} }
}; };