summaryrefslogtreecommitdiffhomepage
path: root/include/stc/cstack.h
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2021-12-23 13:21:21 +0100
committerTyge Løvset <[email protected]>2021-12-23 13:21:21 +0100
commitde411007bceda17457fb27ea72b4433adf744797 (patch)
tree9007e2accfcf4bfdb0347554f3ff671b47c610ed /include/stc/cstack.h
parenta7b11c557e89dfe6314dd07ea558359071da0f92 (diff)
downloadSTC-modified-de411007bceda17457fb27ea72b4433adf744797.tar.gz
STC-modified-de411007bceda17457fb27ea72b4433adf744797.zip
Removed emplace functions if not i_valraw or i_keyraw is defined. Safety/optimize measure.
Diffstat (limited to 'include/stc/cstack.h')
-rw-r--r--include/stc/cstack.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/stc/cstack.h b/include/stc/cstack.h
index 387c0126..1ceec0cb 100644
--- a/include/stc/cstack.h
+++ b/include/stc/cstack.h
@@ -95,10 +95,10 @@ STC_INLINE const _cx_value* _cx_memb(_at)(const _cx_self* self, size_t idx)
{ assert(idx < self->size); return self->data + idx; }
#if !c_option(c_no_clone)
-
+#if !defined _i_no_raw
STC_INLINE _cx_value* _cx_memb(_emplace)(_cx_self* self, _cx_raw raw)
{ return _cx_memb(_push)(self, i_valfrom(raw)); }
-
+#endif
STC_INLINE _cx_self _cx_memb(_clone)(_cx_self v) {
_cx_self out = {(_cx_value *) c_malloc(v.size*sizeof(_cx_value)), v.size, v.size};
for (size_t i = 0; i < v.size; ++i, ++v.data) out.data[i] = i_valfrom(i_valto(v.data));