summaryrefslogtreecommitdiffhomepage
path: root/misc/examples/csmap_erase.c
diff options
context:
space:
mode:
Diffstat (limited to 'misc/examples/csmap_erase.c')
-rw-r--r--misc/examples/csmap_erase.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/misc/examples/csmap_erase.c b/misc/examples/csmap_erase.c
index 48d8ceef..bef00a17 100644
--- a/misc/examples/csmap_erase.c
+++ b/misc/examples/csmap_erase.c
@@ -10,14 +10,14 @@
void printmap(mymap m)
{
- c_foreach (elem, mymap, m)
+ c_FOREACH (elem, mymap, m)
printf(" [%d, %s]", elem.ref->first, cstr_str(&elem.ref->second));
printf("\nsize() == %" c_ZU "\n\n", mymap_size(&m));
}
int main()
{
- c_auto (mymap, m1)
+ c_AUTO (mymap, m1)
{
// Fill in some data to test with, one at a time
mymap_insert(&m1, 1, cstr_lit("A"));
@@ -34,10 +34,10 @@ int main()
printmap(m1);
}
- c_auto (mymap, m2)
+ c_AUTO (mymap, m2)
{
// Fill in some data to test with, one at a time
- c_forlist (i, mymap_raw, {
+ c_FORLIST (i, mymap_raw, {
{10, "Bob"},
{11, "Rob"},
{12, "Robert"},
@@ -51,7 +51,7 @@ int main()
mymap_iter it2 = mymap_find(&m2, mymap_back(&m2)->first);
puts("to remove:");
- c_foreach (i, mymap, it1, it2)
+ c_FOREACH (i, mymap, it1, it2)
printf(" [%d, %s]", i.ref->first, cstr_str(&i.ref->second));
puts("");
// The 2nd member function removes elements
@@ -61,7 +61,7 @@ int main()
printmap(m2);
}
- c_auto (mymap, m3)
+ c_AUTO (mymap, m3)
{
// Fill in some data to test with, one at a time, using emplace
mymap_emplace(&m3, 1, "red");