From 1faffa9b1b500d074f130cba73677e80881da507 Mon Sep 17 00:00:00 2001 From: Arvid Gerstmann Date: Wed, 29 Jun 2016 22:56:37 +0200 Subject: [PATCH 1/2] fixes building --- crnlib/crn_sparse_array.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/crnlib/crn_sparse_array.h b/crnlib/crn_sparse_array.h index 62a93a7..4e64ba0 100644 --- a/crnlib/crn_sparse_array.h +++ b/crnlib/crn_sparse_array.h @@ -355,7 +355,7 @@ namespace crnlib inline T* alloc_group(bool nofail = false) { - T* p = static_cast(alloc_space(N * sizeof(T))); + T* p = static_cast(sparse_array_traits::alloc_space(N * sizeof(T))); if (!p) { @@ -365,7 +365,7 @@ namespace crnlib CRNLIB_FAIL("Out of memory"); } - construct_group(p); + sparse_array_traits::construct_group(p); m_num_active_groups++; @@ -379,20 +379,20 @@ namespace crnlib CRNLIB_ASSERT(m_num_active_groups); m_num_active_groups--; - destruct_group(p); + sparse_array_traits::destruct_group(p); - free_space(p); + sparse_array_traits::free_space(p); } } inline void init_default() { - construct_element(reinterpret_cast(m_default)); + sparse_array_traits::construct_element(reinterpret_cast(m_default)); } inline void deinit_default() { - destruct_element(reinterpret_cast(m_default)); + sparse_array_traits::destruct_element(reinterpret_cast(m_default)); } }; From 0c95eb14d69564d79587de9e32ef0f888555e807 Mon Sep 17 00:00:00 2001 From: Arvid Gerstmann Date: Wed, 29 Jun 2016 23:07:41 +0200 Subject: [PATCH 2/2] clang is also on board --- crnlib/crn_core.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crnlib/crn_core.h b/crnlib/crn_core.h index 6c8c7f0..8ac0adf 100644 --- a/crnlib/crn_core.h +++ b/crnlib/crn_core.h @@ -47,7 +47,7 @@ #define CRNLIB_USE_UNALIGNED_INT_LOADS 1 #define CRNLIB_RESTRICT __restrict - #define CRNLIB_FORCE_INLINE __forceinline + #define CRNLIB_FORCE_INLINE static __forceinline #if defined(_MSC_VER) || defined(__MINGW32__) || defined(__MINGW64__) #define CRNLIB_USE_MSVC_INTRINSICS 1 @@ -82,7 +82,7 @@ #define CRNLIB_RESTRICT - #define CRNLIB_FORCE_INLINE inline __attribute__((__always_inline__,__gnu_inline__)) + #define CRNLIB_FORCE_INLINE static inline __attribute__((__always_inline__,__gnu_inline__)) #define CRNLIB_INT64_FORMAT_SPECIFIER "%lli" #define CRNLIB_UINT64_FORMAT_SPECIFIER "%llu" @@ -113,7 +113,7 @@ #define CRNLIB_USE_WIN32_ATOMIC_FUNCTIONS 0 #define CRNLIB_RESTRICT - #define CRNLIB_FORCE_INLINE inline + #define CRNLIB_FORCE_INLINE static inline #define CRNLIB_INT64_FORMAT_SPECIFIER "%I64i" #define CRNLIB_UINT64_FORMAT_SPECIFIER "%I64u"