MathUtil: Mark lo in SaturatingCast as [[maybe_unused]]
It's unused in the case that T is unsigned and dest is signed (e.g. SaturatingCast<int, size_t> which appears SetIsoPaths in MainSettings.cpp)
This commit is contained in:
parent
a6d516dc94
commit
15f80f7234
|
@ -37,7 +37,7 @@ constexpr Dest SaturatingCast(T value)
|
||||||
{
|
{
|
||||||
static_assert(std::is_integral<Dest>());
|
static_assert(std::is_integral<Dest>());
|
||||||
|
|
||||||
constexpr Dest lo = std::numeric_limits<Dest>::lowest();
|
[[maybe_unused]] constexpr Dest lo = std::numeric_limits<Dest>::lowest();
|
||||||
constexpr Dest hi = std::numeric_limits<Dest>::max();
|
constexpr Dest hi = std::numeric_limits<Dest>::max();
|
||||||
|
|
||||||
// T being a signed integer and Dest unsigned is a problematic case because the value will
|
// T being a signed integer and Dest unsigned is a problematic case because the value will
|
||||||
|
|
Loading…
Reference in New Issue