diff options
| author | Tyge Løvset <[email protected]> | 2023-03-22 17:32:21 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2023-03-22 17:32:21 +0100 |
| commit | e6a25eaaf4687ff99d0d719d0b32ad512156039e (patch) | |
| tree | 6bc1730f6882eb054c6472361487a0be8b85c7aa /misc/examples/arcvec_erase.c | |
| parent | 66429475ed6ac0deaba85989174e8880762d7888 (diff) | |
| download | STC-modified-e6a25eaaf4687ff99d0d719d0b32ad512156039e.tar.gz STC-modified-e6a25eaaf4687ff99d0d719d0b32ad512156039e.zip | |
Added c_foreach_r() macro for reverse iter of cvec, cdeq, cstack.
Moved c_find_if, c_erase_if, c_eraseremove_if to algo/filter.h
Internals.
Diffstat (limited to 'misc/examples/arcvec_erase.c')
| -rw-r--r-- | misc/examples/arcvec_erase.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/misc/examples/arcvec_erase.c b/misc/examples/arcvec_erase.c index 38f11097..9c85d3ab 100644 --- a/misc/examples/arcvec_erase.c +++ b/misc/examples/arcvec_erase.c @@ -30,12 +30,12 @@ int main() printf("\nerase vec.data[2]; or first matching value depending on compare.\n"); Vec_iter it; it = Vec_find(&vec, *vec.data[2].get); - if (it.ref != Vec_end(&vec).ref) + if (it.ref) Vec_erase_at(&vec, it); int year = 2015; it = Vec_find(&vec, year); // Ok as tmp only. - if (it.ref != Vec_end(&vec).ref) + if (it.ref) Vec_erase_at(&vec, it); printf("vec after erase :"); |
