diff options
Diffstat (limited to 'launcher/java/JavaVersion.h')
-rw-r--r-- | launcher/java/JavaVersion.h | 44 |
1 files changed, 18 insertions, 26 deletions
diff --git a/launcher/java/JavaVersion.h b/launcher/java/JavaVersion.h index 9bbf0642..69473203 100644 --- a/launcher/java/JavaVersion.h +++ b/launcher/java/JavaVersion.h @@ -4,42 +4,34 @@ // 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 -{ +class JavaVersion { friend class JavaVersionTest; -public: - JavaVersion() {}; - JavaVersion(const QString & rhs); - JavaVersion & operator=(const QString & rhs); + public: + JavaVersion(){}; + JavaVersion(const QString& rhs); - bool operator<(const JavaVersion & rhs); - bool operator==(const JavaVersion & rhs); - bool operator>(const JavaVersion & rhs); + JavaVersion& operator=(const QString& rhs); + + bool operator<(const JavaVersion& rhs); + bool operator==(const JavaVersion& rhs); + bool operator>(const JavaVersion& rhs); bool requiresPermGen(); - QString toString(); - - int major() - { - return m_major; - } - int minor() - { - return m_minor; - } - int security() - { - return m_security; - } -private: + QString toString() 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; |