remove expects now an iterator.

<== Uniformisation of the containers.
(List expect an iterator too).
This commit is contained in:
Patrick Pelissier committed 2017-05-22 19:25:30 +02:00
1 parent 66f9d726f4
commit e1b1f5e861
2 files changed
+9 -8

No files matched your search

+6 -6
View File
@@ -454,12 +454,6 @@
} \
\
static inline void \
M_C3(array_,name, _remove)(array_t v, size_t i) \
{ \
M_C3(array_, name, _pop_at)(NULL, v, i); \
} \
\
static inline void \
M_C3(array_, name, _swap)(array_t v1, array_t v2) \
{ \
ARRAYI_CONTRACT(v1); \
@@ -607,6 +601,12 @@
M_C3(array_, name, _push_at)(it->array, it->index, x); \
} \
\
static inline void \
M_C3(array_,name, _remove)(array_it_t it) \
{ \
M_C3(array_, name, _pop_at)(NULL, it->array, it->index); \
} \
\
M_IF_METHOD(CMP, oplist) \
( \
static inline void M_C3(array_, name, _sort)(array_t l, \
+3 -2
View File
@@ -260,10 +260,11 @@ static void test_d(void)
for(int i = 10; i < 210; i++) {
assert (*array_uint_get (a1, i) == 0);
}
array_uint_remove (a1, 0);
array_it_uint_t it;
array_uint_it(it, a1);
array_uint_remove (it);
assert (array_uint_size(a1) == 299);
array_it_uint_t it;
array_uint_it_last (it, a1);
assert (array_uint_last_p(it));
array_uint_it_end (it, a1);