mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-08-03 19:37:45 -04:00
chore: update to cxx20
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
9565affa64
commit
29231e2038
@ -24,7 +24,7 @@ set(CMAKE_JAVA_TARGET_OUTPUT_DIR ${PROJECT_BINARY_DIR}/jars)
|
|||||||
######## Set compiler flags ########
|
######## Set compiler flags ########
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED true)
|
set(CMAKE_CXX_STANDARD_REQUIRED true)
|
||||||
set(CMAKE_C_STANDARD_REQUIRED true)
|
set(CMAKE_C_STANDARD_REQUIRED true)
|
||||||
set(CMAKE_CXX_STANDARD 17)
|
set(CMAKE_CXX_STANDARD 20)
|
||||||
set(CMAKE_C_STANDARD 11)
|
set(CMAKE_C_STANDARD 11)
|
||||||
include(GenerateExportHeader)
|
include(GenerateExportHeader)
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
|
@ -63,7 +63,7 @@ bool JavaVersion::isModular() const
|
|||||||
return m_parseable && m_major >= 9;
|
return m_parseable && m_major >= 9;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool JavaVersion::operator<(const JavaVersion& rhs)
|
bool JavaVersion::operator<(const JavaVersion& rhs) const
|
||||||
{
|
{
|
||||||
if (m_parseable && rhs.m_parseable) {
|
if (m_parseable && rhs.m_parseable) {
|
||||||
auto major = m_major;
|
auto major = m_major;
|
||||||
@ -101,7 +101,7 @@ bool JavaVersion::operator<(const JavaVersion& rhs)
|
|||||||
return StringUtils::naturalCompare(m_string, rhs.m_string, Qt::CaseSensitive) < 0;
|
return StringUtils::naturalCompare(m_string, rhs.m_string, Qt::CaseSensitive) < 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool JavaVersion::operator==(const JavaVersion& rhs)
|
bool JavaVersion::operator==(const JavaVersion& rhs) const
|
||||||
{
|
{
|
||||||
if (m_parseable && rhs.m_parseable) {
|
if (m_parseable && rhs.m_parseable) {
|
||||||
return m_major == rhs.m_major && m_minor == rhs.m_minor && m_security == rhs.m_security && m_prerelease == rhs.m_prerelease;
|
return m_major == rhs.m_major && m_minor == rhs.m_minor && m_security == rhs.m_security && m_prerelease == rhs.m_prerelease;
|
||||||
@ -109,7 +109,7 @@ bool JavaVersion::operator==(const JavaVersion& rhs)
|
|||||||
return m_string == rhs.m_string;
|
return m_string == rhs.m_string;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool JavaVersion::operator>(const JavaVersion& rhs)
|
bool JavaVersion::operator>(const JavaVersion& rhs) const
|
||||||
{
|
{
|
||||||
return (!operator<(rhs)) && (!operator==(rhs));
|
return (!operator<(rhs)) && (!operator==(rhs));
|
||||||
}
|
}
|
||||||
|
@ -20,9 +20,9 @@ class JavaVersion {
|
|||||||
|
|
||||||
JavaVersion& operator=(const QString& rhs);
|
JavaVersion& operator=(const QString& rhs);
|
||||||
|
|
||||||
bool operator<(const JavaVersion& rhs);
|
bool operator<(const JavaVersion& rhs) const;
|
||||||
bool operator==(const JavaVersion& rhs);
|
bool operator==(const JavaVersion& rhs) const;
|
||||||
bool operator>(const JavaVersion& rhs);
|
bool operator>(const JavaVersion& rhs) const;
|
||||||
|
|
||||||
bool requiresPermGen() const;
|
bool requiresPermGen() const;
|
||||||
bool defaultsToUtf8() const;
|
bool defaultsToUtf8() const;
|
||||||
|
@ -90,14 +90,6 @@ class ResourceAPI {
|
|||||||
|
|
||||||
std::optional<std::list<Version>> mcVersions;
|
std::optional<std::list<Version>> mcVersions;
|
||||||
std::optional<ModPlatform::ModLoaderTypes> loaders;
|
std::optional<ModPlatform::ModLoaderTypes> loaders;
|
||||||
|
|
||||||
VersionSearchArgs(VersionSearchArgs const&) = default;
|
|
||||||
void operator=(VersionSearchArgs other)
|
|
||||||
{
|
|
||||||
pack = other.pack;
|
|
||||||
mcVersions = other.mcVersions;
|
|
||||||
loaders = other.loaders;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
struct VersionSearchCallbacks {
|
struct VersionSearchCallbacks {
|
||||||
std::function<void(QJsonDocument&, ModPlatform::IndexedPack)> on_succeed;
|
std::function<void(QJsonDocument&, ModPlatform::IndexedPack)> on_succeed;
|
||||||
@ -106,9 +98,6 @@ class ResourceAPI {
|
|||||||
|
|
||||||
struct ProjectInfoArgs {
|
struct ProjectInfoArgs {
|
||||||
ModPlatform::IndexedPack pack;
|
ModPlatform::IndexedPack pack;
|
||||||
|
|
||||||
ProjectInfoArgs(ProjectInfoArgs const&) = default;
|
|
||||||
void operator=(ProjectInfoArgs other) { pack = other.pack; }
|
|
||||||
};
|
};
|
||||||
struct ProjectInfoCallbacks {
|
struct ProjectInfoCallbacks {
|
||||||
std::function<void(QJsonDocument&, const ModPlatform::IndexedPack&)> on_succeed;
|
std::function<void(QJsonDocument&, const ModPlatform::IndexedPack&)> on_succeed;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user