aboutsummaryrefslogtreecommitdiff
path: root/launcher/Version.h
diff options
context:
space:
mode:
authorSefa Eyeoglu <contact@scrumplex.net>2023-08-02 18:35:35 +0200
committerSefa Eyeoglu <contact@scrumplex.net>2023-08-02 18:35:35 +0200
commit1d468ac35ad88d8c77cc83f25e3704d9bd7df01b (patch)
tree8644b1574c947a1a87c5c7b2567f746cfe17882f /launcher/Version.h
parentce2ca1381519a2e261d7f76dffa874d559d979c2 (diff)
downloadPrismLauncher-1d468ac35ad88d8c77cc83f25e3704d9bd7df01b.tar.gz
PrismLauncher-1d468ac35ad88d8c77cc83f25e3704d9bd7df01b.tar.bz2
PrismLauncher-1d468ac35ad88d8c77cc83f25e3704d9bd7df01b.zip
chore: reformat
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
Diffstat (limited to 'launcher/Version.h')
-rw-r--r--launcher/Version.h32
1 files changed, 18 insertions, 14 deletions
diff --git a/launcher/Version.h b/launcher/Version.h
index 659f8e54..51162c07 100644
--- a/launcher/Version.h
+++ b/launcher/Version.h
@@ -48,12 +48,12 @@ class Version {
Version(QString str);
Version() = default;
- bool operator<(const Version &other) const;
- bool operator<=(const Version &other) const;
- bool operator>(const Version &other) const;
- bool operator>=(const Version &other) const;
- bool operator==(const Version &other) const;
- bool operator!=(const Version &other) const;
+ bool operator<(const Version& other) const;
+ bool operator<=(const Version& other) const;
+ bool operator>(const Version& other) const;
+ bool operator>=(const Version& other) const;
+ bool operator==(const Version& other) const;
+ bool operator!=(const Version& other) const;
QString toString() const { return m_string; }
@@ -72,7 +72,7 @@ class Version {
}
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
- auto numPart = QStringView{m_fullString}.left(cutoff);
+ auto numPart = QStringView{ m_fullString }.left(cutoff);
#else
auto numPart = m_fullString.leftRef(cutoff);
#endif
@@ -83,7 +83,7 @@ class Version {
}
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
- auto stringPart = QStringView{m_fullString}.mid(cutoff);
+ auto stringPart = QStringView{ m_fullString }.mid(cutoff);
#else
auto stringPart = m_fullString.midRef(cutoff);
#endif
@@ -103,8 +103,14 @@ class Version {
QString m_fullString;
- [[nodiscard]] inline bool isAppendix() const { return m_stringPart.startsWith('+'); }
- [[nodiscard]] inline bool isPreRelease() const { return m_stringPart.startsWith('-') && m_stringPart.length() > 1; }
+ [[nodiscard]] inline bool isAppendix() const
+ {
+ return m_stringPart.startsWith('+');
+ }
+ [[nodiscard]] inline bool isPreRelease() const
+ {
+ return m_stringPart.startsWith('-') && m_stringPart.length() > 1;
+ }
inline bool operator==(const Section& other) const
{
@@ -121,7 +127,7 @@ class Version {
}
inline bool operator<(const Section& other) const
- {
+ {
static auto unequal_is_less = [](Section const& non_null) -> bool {
if (non_null.m_stringPart.isEmpty())
return non_null.m_numPart == 0;
@@ -154,7 +160,7 @@ class Version {
{
return !(*this == other);
}
- inline bool operator>(const Section &other) const
+ inline bool operator>(const Section& other) const
{
return !(*this < other || *this == other);
}
@@ -166,5 +172,3 @@ class Version {
void parse();
};
-
-