Silence some warnings
This commit is contained in:
@@ -88,13 +88,12 @@ namespace OpenVulkano
|
||||
{
|
||||
if (build)
|
||||
return fmt::format("v{}.{}.{}.{}", major, minor, patch, build);
|
||||
else
|
||||
return fmt::format("v{}.{}.{}", major, minor, patch);
|
||||
return fmt::format("v{}.{}.{}", major, minor, patch);
|
||||
}
|
||||
}
|
||||
|
||||
Version::Version(uint32_t major, uint32_t minor, uint32_t patch, const uint32_t build)
|
||||
: m_versionComponents(build ? std::initializer_list<uint32_t>{major, minor, patch, build} : std::initializer_list<uint32_t>{major, minor, patch})
|
||||
: m_versionComponents(build ? std::initializer_list{major, minor, patch, build} : std::initializer_list{major, minor, patch})
|
||||
, m_buildNumber(build)
|
||||
, m_versionString(ToString(major, minor, patch, build))
|
||||
{}
|
||||
@@ -135,7 +134,7 @@ namespace OpenVulkano
|
||||
}
|
||||
|
||||
//region Compare functions
|
||||
int Version::CompareBuildNr(const OpenVulkano::Version& other) const
|
||||
int Version::CompareBuildNr(const Version& other) const
|
||||
{
|
||||
if (m_buildNumber == 0 || other.m_buildNumber == 0) return 0;
|
||||
if (m_buildNumber > other.m_buildNumber) return 1;
|
||||
@@ -170,7 +169,7 @@ namespace OpenVulkano
|
||||
return 0;
|
||||
}
|
||||
|
||||
int Version::Compare(const OpenVulkano::Version& other) const
|
||||
int Version::Compare(const Version& other) const
|
||||
{
|
||||
int comp;
|
||||
if ((comp = CompareComponents(other)) != 0) return comp;
|
||||
@@ -181,7 +180,7 @@ namespace OpenVulkano
|
||||
|
||||
namespace
|
||||
{
|
||||
uint32_t GetDigits(double val)
|
||||
uint32_t GetDigits(const double val)
|
||||
{
|
||||
if (val == 0) return 0;
|
||||
std::string fracStr = std::to_string(val);
|
||||
@@ -191,7 +190,7 @@ namespace OpenVulkano
|
||||
}
|
||||
}
|
||||
|
||||
Version::Version(double version)
|
||||
Version::Version(const double version)
|
||||
: Version(static_cast<uint32_t>(version), GetDigits(version))
|
||||
{}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user