From d63d4a2a23dca342f418a5ccf8adf46e0d08d95a Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Thu, 23 Dec 2021 15:14:47 +0100 Subject: Fix new_sptr.c example. --- include/stc/ccommon.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/stc/ccommon.h b/include/stc/ccommon.h index 4e2ee97d..8ae0dfae 100644 --- a/include/stc/ccommon.h +++ b/include/stc/ccommon.h @@ -192,12 +192,12 @@ STC_INLINE uint64_t c_default_hash(const void* key, size_t len) { #define c_apply(v, method, T, ...) do { \ const T _c_arr[] = __VA_ARGS__; \ for (size_t index = 0; index < c_arraylen(_c_arr); ++index) \ - { const T v = _c_arr[index]; method; } \ + { T v = _c_arr[index]; method; } \ } while (0) #define c_apply_arr(v, method, T, arr, n) do { \ const T* _c_arr = arr; size_t _n = n; \ for (size_t index = 0; index < _n; ++index) \ - { const T v = _c_arr[index]; method; } \ + { T v = _c_arr[index]; method; } \ } while (0) #define c_apply_cnt(v, method, C, ...) do { \ size_t index = 0; \ -- cgit v1.2.3