aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
Diffstat (limited to 'host')
-rw-r--r--host/lib/include/uhdlib/rfnoc/chdr_types.hpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/host/lib/include/uhdlib/rfnoc/chdr_types.hpp b/host/lib/include/uhdlib/rfnoc/chdr_types.hpp
index fd6a6e829..393996c6b 100644
--- a/host/lib/include/uhdlib/rfnoc/chdr_types.hpp
+++ b/host/lib/include/uhdlib/rfnoc/chdr_types.hpp
@@ -196,21 +196,21 @@ private:
static constexpr size_t LENGTH_OFFSET = 16;
static constexpr size_t DST_EPID_OFFSET = 0;
- static inline constexpr uint64_t mask(size_t width)
+ static inline uint64_t mask(const size_t width)
{
return ((uint64_t(1) << width) - 1);
}
template <typename field_t>
- static inline constexpr field_t get_field(
- uint64_t flat_hdr, size_t offset, size_t width)
+ static inline field_t get_field(
+ const uint64_t flat_hdr, const size_t offset, const size_t width)
{
return static_cast<field_t>((flat_hdr >> offset) & mask(width));
}
template <typename field_t>
- static inline constexpr uint64_t set_field(
- const uint64_t old_val, field_t field, size_t offset, size_t width)
+ static inline uint64_t set_field(
+ const uint64_t old_val, const field_t field, const size_t offset, const size_t width)
{
return (old_val & ~(mask(width) << offset))
| ((static_cast<uint64_t>(field) & mask(width)) << offset);