summaryrefslogtreecommitdiffhomepage
path: root/include/stc/cstack.h
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-12-30 12:36:13 +0100
committerTyge Løvset <[email protected]>2022-12-30 14:38:39 +0100
commit4f0f45422fb58e9b134445ad6a4ea96d806214e8 (patch)
treeea0bb95c1f82fa5ec71218ce1f6d7ce9bfcc4e29 /include/stc/cstack.h
parent0761c13f316cc98ae7756f3527931aa86bed5016 (diff)
downloadSTC-modified-4f0f45422fb58e9b134445ad6a4ea96d806214e8.tar.gz
STC-modified-4f0f45422fb58e9b134445ad6a4ea96d806214e8.zip
More restructuring of files and cleanup. Moved carr2.h and carr3.h to misc/include/old/ as it is not among classic containers.
Removed stctest.h: Recommending https://github.com/bvdberg/ctest instead.
Diffstat (limited to 'include/stc/cstack.h')
-rw-r--r--include/stc/cstack.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/include/stc/cstack.h b/include/stc/cstack.h
index e4b64848..5e87cf9f 100644
--- a/include/stc/cstack.h
+++ b/include/stc/cstack.h
@@ -52,9 +52,6 @@ STC_INLINE _cx_self _cx_memb(_init)(void) {
}
#ifdef i_capacity
-#define cstack_INITIALIZER(T, ...) \
- {.data=__VA_ARGS__, ._len=sizeof((T[])__VA_ARGS__)/sizeof(T)}
-
STC_INLINE void _cx_memb(_create)(_cx_self* self)
{ self->_len = 0; }
#else
@@ -71,7 +68,7 @@ STC_INLINE _cx_self _cx_memb(_with_size)(size_t size, i_key null) {
while (size) out.data[--size] = null;
return out;
}
-#endif
+#endif // i_capacity
STC_INLINE void _cx_memb(_clear)(_cx_self* self) {
_cx_value *p = self->data + self->_len;