From c4441f5fc665194fbd7a894a67a64a08c3beac42 Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Wed, 8 Feb 2023 16:16:49 +0100 Subject: Changed to use lowercase flow-control macros in examples (uppercase will still be supported). Improved many examples to use c_make() to init containers. --- misc/examples/sidebyside.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'misc/examples/sidebyside.cpp') diff --git a/misc/examples/sidebyside.cpp b/misc/examples/sidebyside.cpp index 11328668..80c934a4 100644 --- a/misc/examples/sidebyside.cpp +++ b/misc/examples/sidebyside.cpp @@ -25,13 +25,13 @@ int main() { std::cout << std::endl; } - c_AUTO (IIMap, hist) + c_auto (IIMap, hist) { IIMap_insert(&hist, 12, 100).ref->second += 1; IIMap_insert(&hist, 13, 100).ref->second += 1; IIMap_insert(&hist, 12, 100).ref->second += 1; - c_FOREACH (i, IIMap, hist) + c_foreach (i, IIMap, hist) printf("%d, %d\n", i.ref->first, i.ref->second); puts(""); } @@ -45,12 +45,12 @@ int main() { std::cout << std::endl; } - c_AUTO (SIMap, food) + c_auto (SIMap, food) { - c_FORLIST (i, SIMap_raw, {{"burger", 5}, {"pizza", 12}, {"steak", 15}}) + c_forlist (i, SIMap_raw, {{"burger", 5}, {"pizza", 12}, {"steak", 15}}) SIMap_emplace(&food, c_PAIR(i.ref)); - c_FOREACH (i, SIMap, food) + c_foreach (i, SIMap, food) printf("%s, %d\n", cstr_str(&i.ref->first), i.ref->second); puts(""); } -- cgit v1.2.3