Silence some warnings
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
/*
|
||||
* Copyright (c) 2025. MadVoxel AG
|
||||
* All rights reserved.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -76,7 +81,7 @@ namespace OpenVulkano
|
||||
o.m_leadComponents = { 0, 0 };
|
||||
}
|
||||
|
||||
VersionDataExtended(VersionDataExtendedData&& data) :
|
||||
[[maybe_unused]] VersionDataExtended(VersionDataExtendedData&& data) :
|
||||
m_leadComponents({ UINT32_MAX, UINT32_MAX }), m_data(std::make_unique<VersionDataExtendedData>(std::move(data)))
|
||||
{}
|
||||
|
||||
@@ -119,16 +124,16 @@ namespace OpenVulkano
|
||||
else compact = o.compact;
|
||||
}
|
||||
|
||||
VersionData(const VersionDataCompact& other) { new (&compact)VersionDataCompact(other); }
|
||||
[[maybe_unused]] VersionData(const VersionDataCompact& other) { new (&compact)VersionDataCompact(other); }
|
||||
|
||||
VersionData(VersionDataCompact&& other) { new (&compact) VersionDataCompact(std::move(other)); }
|
||||
|
||||
VersionData(const VersionDataExtended& other)
|
||||
[[maybe_unused]] VersionData(const VersionDataExtended& other)
|
||||
{
|
||||
new (&extended)VersionDataExtended(other);
|
||||
}
|
||||
|
||||
VersionData(VersionDataExtended&& other) { new (&extended) VersionDataExtended(std::move(other)); }
|
||||
[[maybe_unused]] VersionData(VersionDataExtended&& other) { new (&extended) VersionDataExtended(std::move(other)); }
|
||||
|
||||
~VersionData()
|
||||
{
|
||||
@@ -252,12 +257,11 @@ namespace OpenVulkano
|
||||
|
||||
//[[nodiscard]] bool IsPreRelease() const { return m_preRelease; }
|
||||
|
||||
[[nodiscard]] const std::vector<std::string>& GetTags() const
|
||||
[[nodiscard]] std::span<const std::string> GetTags() const
|
||||
{
|
||||
static std::vector<std::string> fallbackTags;
|
||||
if (IsExtendedData())
|
||||
return m_data.extended.m_data->m_tagComponents;
|
||||
return fallbackTags;
|
||||
return {};
|
||||
}
|
||||
|
||||
[[nodiscard]] std::span<const uint32_t> GetVersionComponents() const
|
||||
@@ -290,8 +294,10 @@ namespace OpenVulkano
|
||||
[[nodiscard]] int CompareComponents(const Version& other) const;
|
||||
};
|
||||
|
||||
static Version operator""_v(const char* str) { return { str }; }
|
||||
static Version operator""_version(const char* str) { return { str }; }
|
||||
static Version operator""_v(const long double val) { return Version(static_cast<double>(val)); }
|
||||
static Version operator""_version(const long double val) { return Version(static_cast<double>(val)); }
|
||||
[[nodiscard]] [[maybe_unused]] static Version operator""_v(const char* str) { return { str }; }
|
||||
[[nodiscard]] [[maybe_unused]] static Version operator""_v(const char* str, size_t c) { return { std::string_view(str, c) }; }
|
||||
[[nodiscard]] [[maybe_unused]] static Version operator""_version(const char* str) { return { str }; }
|
||||
[[nodiscard]] [[maybe_unused]] static Version operator""_version(const char* str, size_t c) { return { std::string_view(str, c) }; }
|
||||
[[nodiscard]] [[maybe_unused]] static Version operator""_v(const long double val) { return Version(static_cast<double>(val)); }
|
||||
[[nodiscard]] [[maybe_unused]] static Version operator""_version(const long double val) { return Version(static_cast<double>(val)); }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user