aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorMichael Dickens <michael.dickens@ettus.com>2020-02-15 15:39:45 -0500
committeratrnati <54334261+atrnati@users.noreply.github.com>2020-02-21 09:53:51 -0600
commit84bc3a9912f956681adbb90bca51afa2199b0969 (patch)
treec86c69093e0b7b3bea7d0b67fc93e97326a993cc /host
parented72347d53b11b01aa4a7b84eac90bd878950ca6 (diff)
downloaduhd-84bc3a9912f956681adbb90bca51afa2199b0969.tar.gz
uhd-84bc3a9912f956681adbb90bca51afa2199b0969.tar.bz2
uhd-84bc3a9912f956681adbb90bca51afa2199b0969.zip
lib: tweak prototypes to not be constexpr to allow building on OSX
Make all arguments const, in line with how other static methods are declared.
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);