From 84bc3a9912f956681adbb90bca51afa2199b0969 Mon Sep 17 00:00:00 2001 From: Michael Dickens Date: Sat, 15 Feb 2020 15:39:45 -0500 Subject: 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. --- host/lib/include/uhdlib/rfnoc/chdr_types.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'host/lib') 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 - 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((flat_hdr >> offset) & mask(width)); } template - 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(field) & mask(width)) << offset); -- cgit v1.2.3