aboutsummaryrefslogtreecommitdiff
path: root/bitfield.h
diff options
context:
space:
mode:
authorJohannes Stoelp <johannes.stoelp@gmail.com>2024-07-25 23:16:04 +0200
committerJohannes Stoelp <johannes.stoelp@gmail.com>2024-07-25 23:16:04 +0200
commitaf7a61a5464c266426a20e7dacf6c52bb80b28e9 (patch)
tree2257894c751d29ebf6b2eb1a8d1ec9fcf4c70c62 /bitfield.h
parent792409865b159aaf49e3153a5f6c136f199e70a3 (diff)
downloadcpp-utils-af7a61a5464c266426a20e7dacf6c52bb80b28e9.tar.gz
cpp-utils-af7a61a5464c266426a20e7dacf6c52bb80b28e9.zip
lint: fix lints from newer clang-tidy version
Diffstat (limited to 'bitfield.h')
-rw-r--r--bitfield.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/bitfield.h b/bitfield.h
index a49a997..be7eed8 100644
--- a/bitfield.h
+++ b/bitfield.h
@@ -20,7 +20,7 @@ static constexpr bool is_bitfield_type_v =
/// compute_mask<4, 7, uint32_t>() -> 0xf0
template <std::uint8_t LowBit, std::uint8_t HighBit, typename ValueType>
static constexpr inline ValueType compute_mask() {
- using unsigned_t = typename std::make_unsigned<ValueType>::type;
+ using unsigned_t = std::make_unsigned_t<ValueType>;
constexpr unsigned_t kMaxBits = sizeof(unsigned_t) * 8;
static_assert(HighBit < kMaxBits, "HighBit exceeds bits of ValueType");
@@ -67,7 +67,7 @@ struct field_ref {
private:
ValueType& m_val;
- enum : ValueType {
+ enum : ValueType { // NOLINT(performance-enum-size)
kMask = impl::compute_mask<LowBit, HighBit, ValueType>(),
};
};
@@ -89,7 +89,7 @@ struct const_field_ref {
private:
const ValueType& m_val;
- enum : ValueType {
+ enum : ValueType { // NOLINT(performance-enum-size)
kMask = impl::compute_mask<LowBit, HighBit, ValueType>(),
};
};