aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/mod/ModDetails.h
diff options
context:
space:
mode:
authorRachel Powers <508861+Ryex@users.noreply.github.com>2023-06-30 23:51:15 -0700
committerRachel Powers <508861+Ryex@users.noreply.github.com>2023-07-01 23:39:38 -0700
commit8d7dcdfc5b2a231a1304878e25929e6f4ff4e338 (patch)
tree761f56c74858e9811b9fa78ff63392f51836678c /launcher/minecraft/mod/ModDetails.h
parent98d6904e4a84836c1b9ec662b0b8a49d5282e27b (diff)
downloadPrismLauncher-8d7dcdfc5b2a231a1304878e25929e6f4ff4e338.tar.gz
PrismLauncher-8d7dcdfc5b2a231a1304878e25929e6f4ff4e338.tar.bz2
PrismLauncher-8d7dcdfc5b2a231a1304878e25929e6f4ff4e338.zip
chore: fix shadowed member and signed/unsigned mismatch
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com> chore: supress unused with [[maybe_unused]] Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com> chore: unshadow ^&^& static_cast implicit return Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com> chore: deshadow and mark unused in parse task Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com> chore: mark unused in folder models Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com> chore: deshadow and mark unused with instances Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com> chore: more deshadow and unused Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com> chore: remove uneeded simicolons Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com> chore: mark unused Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com> chore: prevent shadow Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
Diffstat (limited to 'launcher/minecraft/mod/ModDetails.h')
-rw-r--r--launcher/minecraft/mod/ModDetails.h19
1 files changed, 8 insertions, 11 deletions
diff --git a/launcher/minecraft/mod/ModDetails.h b/launcher/minecraft/mod/ModDetails.h
index b4e59d52..ae36baa8 100644
--- a/launcher/minecraft/mod/ModDetails.h
+++ b/launcher/minecraft/mod/ModDetails.h
@@ -59,17 +59,17 @@ struct ModLicense {
ModLicense() {}
ModLicense(const QString license) {
- // FIXME: come up with a better license parseing.
+ // FIXME: come up with a better license parsing.
// handle SPDX identifiers? https://spdx.org/licenses/
auto parts = license.split(' ');
QStringList notNameParts = {};
for (auto part : parts) {
- auto url = QUrl(part);
+ auto _url = QUrl(part);
if (part.startsWith("(") && part.endsWith(")"))
- url = QUrl(part.mid(1, part.size() - 2));
+ _url = QUrl(part.mid(1, part.size() - 2));
- if (url.isValid() && !url.scheme().isEmpty() && !url.host().isEmpty()) {
- this->url = url.toString();
+ if (_url.isValid() && !_url.scheme().isEmpty() && !_url.host().isEmpty()) {
+ this->url = _url.toString();
notNameParts.append(part);
continue;
}
@@ -89,12 +89,9 @@ struct ModLicense {
}
- ModLicense(const QString name, const QString id, const QString url, const QString description) {
- this->name = name;
- this->id = id;
- this->url = url;
- this->description = description;
- }
+ ModLicense(const QString& name_, const QString& id_, const QString& url_, const QString& description_)
+ : name(name_), id(id_), url(url_), description(description_)
+ {}
ModLicense(const ModLicense& other)
: name(other.name)