diff --git a/ports-of-call/array.hpp b/ports-of-call/array.hpp index 02f311ef..833f1a9b 100644 --- a/ports-of-call/array.hpp +++ b/ports-of-call/array.hpp @@ -31,22 +31,22 @@ struct bits { using type = T[N]; template - PORTABLE_FUNCTION static constexpr T &ref_access(type &array, + PORTABLE_FORCEINLINE_FUNCTION static constexpr T &ref_access(type &array, IntT index) { return array[index]; } template - PORTABLE_FUNCTION static constexpr T const & + PORTABLE_FORCEINLINE_FUNCTION static constexpr T const & ref_access(type const &array, IntT index) { return array[index]; } - PORTABLE_FUNCTION static constexpr T *ptr_access(type &array) { + PORTABLE_FORCEINLINE_FUNCTION static constexpr T *ptr_access(type &array) { return static_cast(array); } - PORTABLE_FUNCTION static constexpr T const * + PORTABLE_FORCEINLINE_FUNCTION static constexpr T const * ptr_access(type const &array) { return static_cast(array); } @@ -57,21 +57,21 @@ struct bits { using type = T[1]; template - PORTABLE_FUNCTION static constexpr T &ref_access(type &arr, IntT) { + PORTABLE_FORCEINLINE_FUNCTION static constexpr T &ref_access(type &arr, IntT) { return arr[0]; } template - PORTABLE_FUNCTION static constexpr T const &ref_access(type const &arr, + PORTABLE_FORCEINLINE_FUNCTION static constexpr T const &ref_access(type const &arr, IntT) { return arr[0]; } - PORTABLE_FUNCTION static constexpr T *ptr_access(type &arr) { + PORTABLE_FORCEINLINE_FUNCTION static constexpr T *ptr_access(type &arr) { return (T *)&arr; } - PORTABLE_FUNCTION static constexpr T const * + PORTABLE_FORCEINLINE_FUNCTION static constexpr T const * ptr_access(type const &arr) { return (T const *)&arr; }