From a8fc8ac4e8c1481300e0d46bbd376f32ebeb4635 Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Mon, 20 Feb 2023 14:44:25 +0100 Subject: Added c_eraseremove_if() for cvec, cdeq, cstack, cqueue in ccommon.h. Some cleanup. --- include/stc/cstack.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/stc/cstack.h') diff --git a/include/stc/cstack.h b/include/stc/cstack.h index 54bf7850..f0c930e5 100644 --- a/include/stc/cstack.h +++ b/include/stc/cstack.h @@ -82,7 +82,6 @@ STC_INLINE void _cx_memb(_drop)(_cx_self* self) { i_free(self->data); #endif } - STC_INLINE intptr_t _cx_memb(_size)(const _cx_self* self) { return self->_len; } @@ -96,6 +95,8 @@ STC_INLINE intptr_t _cx_memb(_capacity)(const _cx_self* self) { return i_capacity; #endif } +STC_INLINE void _cx_memb(_value_drop)(_cx_value* val) + { i_keydrop(val); } STC_INLINE bool _cx_memb(_reserve)(_cx_self* self, intptr_t n) { if (n < self->_len) return true; -- cgit v1.2.3