From a5e466717fe63e7b10ef4928c55c9451793fc6e4 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Mon, 6 Sep 2021 07:09:48 +1000 Subject: util/coretmpl.h: Fixed clang narrowing warning. --- src/lib/util/coretmpl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 constexpr T BIT(T x, U n, V w) /// \return The extracted bits packed into a right-aligned field. template 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); -- cgit v1.2.3