summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2021-09-06 07:09:48 +1000
committer Vas Crabb <vas@vastheman.com>2021-09-06 07:09:48 +1000
commita5e466717fe63e7b10ef4928c55c9451793fc6e4 (patch)
tree3e4bde14f172f761af5be69e3171d76937274cc9
parent467b4615f633593ff763352a492aede7d072d2c5 (diff)
util/coretmpl.h: Fixed clang narrowing warning.
-rw-r--r--src/lib/util/coretmpl.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/util/coretmpl.h b/src/lib/util/coretmpl.h
index 49f01f8415c..9d033f72d26 100644
--- a/src/lib/util/coretmpl.h
+++ b/src/lib/util/coretmpl.h
@@ -627,7 +627,7 @@ template <typename T, typename U, typename V> constexpr T BIT(T x, U n, V w)
/// \return The extracted bits packed into a right-aligned field.
template <typename T, typename U, typename... V> constexpr T bitswap(T val, U b, V... c) noexcept
{
- if constexpr (sizeof...(c))
+ if constexpr (sizeof...(c) > 0U)
return (BIT(val, b) << sizeof...(c)) | bitswap(val, c...);
else
return BIT(val, b);