diff options
Diffstat (limited to 'include/stc/cvec.h')
| -rw-r--r-- | include/stc/cvec.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/stc/cvec.h b/include/stc/cvec.h index dc16e94a..12cd6875 100644 --- a/include/stc/cvec.h +++ b/include/stc/cvec.h @@ -94,13 +94,13 @@ STC_API _cx_iter _cx_MEMB(_binary_search_in)(_cx_iter it1, _cx_iter it2, STC_INLINE void _cx_MEMB(_value_drop)(_cx_value* val) { i_keydrop(val); } STC_INLINE _cx_value* _cx_MEMB(_push)(_cx_Self* self, i_key value) { - if (self->_len == self->_cap) - if (!_cx_MEMB(_reserve)(self, self->_len*3/2 + 4)) - return NULL; - _cx_value *v = self->data + self->_len++; - *v = value; - return v; -} + if (self->_len == self->_cap) + if (!_cx_MEMB(_reserve)(self, self->_len*2 + 4)) + return NULL; + _cx_value *v = self->data + self->_len++; + *v = value; + return v; + } #if !defined i_no_emplace STC_API _cx_iter |
