summaryrefslogtreecommitdiffhomepage
path: root/examples/demos.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/demos.c')
-rw-r--r--examples/demos.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/demos.c b/examples/demos.c
index 4eac761c..553d6d88 100644
--- a/examples/demos.c
+++ b/examples/demos.c
@@ -161,11 +161,12 @@ void mapdemo3()
cmap_str_emplace(&table, "Map", "test");
cmap_str_emplace(&table, "Make", "my");
cmap_str_emplace(&table, "Sunny", "day");
- cmap_str_value_t *e = cmap_str_find(&table, "Make").ref;
+ cmap_str_iter_t it = cmap_str_find(&table, "Make");
c_foreach (i, cmap_str, table)
printf("entry: %s: %s\n", i.ref->first.str, i.ref->second.str);
- printf("size %zu: remove: Make: %s\n", cmap_str_size(table), e->second.str);
- cmap_str_erase(&table, "Make");
+ printf("size %zu: remove: Make: %s\n", cmap_str_size(table), it.ref->second.str);
+ //cmap_str_erase(&table, "Make");
+ cmap_str_erase_at(&table, it);
printf("size %zu\n", cmap_str_size(table));
c_foreach (i, cmap_str, table)