summaryrefslogtreecommitdiff
path: root/launcher/java/JavaVersion.h
diff options
context:
space:
mode:
authorMehmet Samet Duman <yongdohyun@projecttick.org>2026-04-02 17:36:40 +0300
committerMehmet Samet Duman <yongdohyun@projecttick.org>2026-04-02 17:36:40 +0300
commit1d4bf6e8b1208383021e22f61d859e9b721c482d (patch)
tree21c8e0c4350d7c44d817243ebf409be625ea4f21 /launcher/java/JavaVersion.h
parent38c57e163abad6216f7e0f44d401c362c5fd5da6 (diff)
downloadProject-Tick-1d4bf6e8b1208383021e22f61d859e9b721c482d.tar.gz
Project-Tick-1d4bf6e8b1208383021e22f61d859e9b721c482d.zip
NOISSUE reformat MeshMC to new clang format rules and fixed macOS portability issue and java find issue
Signed-off-by: Mehmet Samet Duman <yongdohyun@projecttick.org>
Diffstat (limited to 'launcher/java/JavaVersion.h')
-rw-r--r--launcher/java/JavaVersion.h67
1 files changed, 35 insertions, 32 deletions
diff --git a/launcher/java/JavaVersion.h b/launcher/java/JavaVersion.h
index 5c4ce06ec9..18ab256edb 100644
--- a/launcher/java/JavaVersion.h
+++ b/launcher/java/JavaVersion.h
@@ -23,48 +23,51 @@
#include <QString>
-// NOTE: apparently the GNU C library pollutes the global namespace with these... undef them.
+// NOTE: apparently the GNU C library pollutes the global namespace with
+// these... undef them.
#ifdef major
- #undef major
+#undef major
#endif
#ifdef minor
- #undef minor
+#undef minor
#endif
class JavaVersion
{
- friend class JavaVersionTest;
-public:
- JavaVersion() {};
- JavaVersion(const QString & rhs);
+ friend class JavaVersionTest;
- JavaVersion & operator=(const QString & rhs);
+ public:
+ JavaVersion() {};
+ JavaVersion(const QString& rhs);
- bool operator<(const JavaVersion & rhs) const;
- bool operator==(const JavaVersion & rhs) const;
- bool operator>(const JavaVersion & rhs) const;
+ JavaVersion& operator=(const QString& rhs);
- bool requiresPermGen();
+ bool operator<(const JavaVersion& rhs) const;
+ bool operator==(const JavaVersion& rhs) const;
+ bool operator>(const JavaVersion& rhs) const;
- QString toString();
+ bool requiresPermGen() const;
- int major()
- {
- return m_major;
- }
- int minor()
- {
- return m_minor;
- }
- int security()
- {
- return m_security;
- }
-private:
- QString m_string;
- int m_major = 0;
- int m_minor = 0;
- int m_security = 0;
- bool m_parseable = false;
- QString m_prerelease;
+ QString toString() const;
+
+ int major() const
+ {
+ return m_major;
+ }
+ int minor() const
+ {
+ return m_minor;
+ }
+ int security() const
+ {
+ return m_security;
+ }
+
+ private:
+ QString m_string;
+ int m_major = 0;
+ int m_minor = 0;
+ int m_security = 0;
+ bool m_parseable = false;
+ QString m_prerelease;
};