diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/stc/cdeq.h | 4 | ||||
| -rw-r--r-- | include/stc/cpque.h | 2 | ||||
| -rw-r--r-- | include/stc/cvec.h | 5 |
3 files changed, 2 insertions, 9 deletions
diff --git a/include/stc/cdeq.h b/include/stc/cdeq.h index 264761e0..160c7601 100644 --- a/include/stc/cdeq.h +++ b/include/stc/cdeq.h @@ -158,10 +158,6 @@ cx_memb(_emplace_range)(Self* self, cx_iter_t it, cx_iter_t it1, cx_iter_t it2) }
STC_INLINE cx_iter_t
-cx_memb(_erase)(Self* self, size_t idx) {
- return cx_memb(_erase_range_p)(self, self->data + idx, self->data + idx + 1);
-}
-STC_INLINE cx_iter_t
cx_memb(_erase_n)(Self* self, size_t idx, size_t n) {
return cx_memb(_erase_range_p)(self, self->data + idx, self->data + idx + n);
}
diff --git a/include/stc/cpque.h b/include/stc/cpque.h index 0a06fc40..3fc8ebea 100644 --- a/include/stc/cpque.h +++ b/include/stc/cpque.h @@ -53,7 +53,7 @@ STC_INLINE Self cx_memb(_with_capacity)(size_t cap) { STC_INLINE void cx_memb(_reserve)(Self* self, size_t n) {
if (n >= self->size)
- self->data = (cx_value_t *)c_realloc(self->data, (self->capacity = n)*sizeof(cx_rawvalue_t));
+ self->data = (cx_value_t *)c_realloc(self->data, (self->capacity = n)*sizeof(cx_value_t));
}
STC_INLINE void cx_memb(_clear)(Self* self) {
diff --git a/include/stc/cvec.h b/include/stc/cvec.h index ff5b4399..3810e678 100644 --- a/include/stc/cvec.h +++ b/include/stc/cvec.h @@ -172,10 +172,7 @@ STC_INLINE cx_iter_t cx_memb(_emplace_range)(Self* self, cx_iter_t it, cx_iter_t it1, cx_iter_t it2) {
return cx_memb(_insert_range_p)(self, it.ref, it1.ref, it2.ref, true);
}
-STC_INLINE cx_iter_t
-cx_memb(_erase)(Self* self, size_t idx) {
- return cx_memb(_erase_range_p)(self, self->data + idx, self->data + idx + 1);
-}
+
STC_INLINE cx_iter_t
cx_memb(_erase_n)(Self* self, size_t idx, size_t n) {
return cx_memb(_erase_range_p)(self, self->data + idx, self->data + idx + n);
|
