MultiMC5/launcher/java/JavaInstall.cpp
Petr Mrázek 49970ae730 NOISSUE Redo system and java architecture probing
MultiMC should now detect aarch64/arm64 architectures and no longer uses
'32' and '64' as CPU architectures.

Detection should work for x86, amd64 and aarch64.

This also affected the old (unused) analytics code, so I removed it.
2024-12-21 03:47:16 +01:00

34 lines
637 B
C++

#include "JavaInstall.h"
#include <MMCStrings.h>
bool JavaInstall::operator<(const JavaInstall &rhs)
{
if(arch < rhs.arch)
{
return true;
}
if(arch > rhs.arch)
{
return false;
}
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)
{
return arch == rhs.arch && id == rhs.id && path == rhs.path;
}
bool JavaInstall::operator>(const JavaInstall &rhs)
{
return (!operator<(rhs)) && (!operator==(rhs));
}