diff options
| author | Mehmet Samet Duman <yongdohyun@projecttick.org> | 2026-04-02 17:36:40 +0300 |
|---|---|---|
| committer | Mehmet Samet Duman <yongdohyun@projecttick.org> | 2026-04-02 17:36:40 +0300 |
| commit | 1d4bf6e8b1208383021e22f61d859e9b721c482d (patch) | |
| tree | 21c8e0c4350d7c44d817243ebf409be625ea4f21 /launcher/java/JavaInstall.cpp | |
| parent | 38c57e163abad6216f7e0f44d401c362c5fd5da6 (diff) | |
| download | Project-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/JavaInstall.cpp')
| -rw-r--r-- | launcher/java/JavaInstall.cpp | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/launcher/java/JavaInstall.cpp b/launcher/java/JavaInstall.cpp index ededf58382..f5522a9621 100644 --- a/launcher/java/JavaInstall.cpp +++ b/launcher/java/JavaInstall.cpp @@ -22,28 +22,27 @@ #include "JavaInstall.h" #include <MMCStrings.h> -bool JavaInstall::operator<(const JavaInstall &rhs) +bool JavaInstall::operator<(const JavaInstall& rhs) { - auto archCompare = Strings::naturalCompare(arch, rhs.arch, Qt::CaseInsensitive); - if(archCompare != 0) - return archCompare < 0; - if(id < rhs.id) - { - return true; - } - if(id > rhs.id) - { - return false; - } - return Strings::naturalCompare(path, rhs.path, Qt::CaseInsensitive) < 0; + auto archCompare = + Strings::naturalCompare(arch, rhs.arch, Qt::CaseInsensitive); + if (archCompare != 0) + return archCompare < 0; + if (id < rhs.id) { + return true; + } + if (id > rhs.id) { + return false; + } + return Strings::naturalCompare(path, rhs.path, Qt::CaseInsensitive) < 0; } -bool JavaInstall::operator==(const JavaInstall &rhs) +bool JavaInstall::operator==(const JavaInstall& rhs) { - return arch == rhs.arch && id == rhs.id && path == rhs.path; + return arch == rhs.arch && id == rhs.id && path == rhs.path; } -bool JavaInstall::operator>(const JavaInstall &rhs) +bool JavaInstall::operator>(const JavaInstall& rhs) { - return (!operator<(rhs)) && (!operator==(rhs)); + return (!operator<(rhs)) && (!operator==(rhs)); } |
