diff options
| author | Tyge Løvset <[email protected]> | 2023-02-08 16:16:49 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2023-02-08 17:18:24 +0100 |
| commit | c4441f5fc665194fbd7a894a67a64a08c3beac42 (patch) | |
| tree | 82f231b6e8fcb75625166f98aa785baaa265a3d6 /misc/examples/sidebyside.cpp | |
| parent | 673dd5319a488d4b702b94dd9aeda4e497ae4fbc (diff) | |
| download | STC-modified-c4441f5fc665194fbd7a894a67a64a08c3beac42.tar.gz STC-modified-c4441f5fc665194fbd7a894a67a64a08c3beac42.zip | |
Changed to use lowercase flow-control macros in examples (uppercase will still be supported). Improved many examples to use c_make() to init containers.
Diffstat (limited to 'misc/examples/sidebyside.cpp')
| -rw-r--r-- | misc/examples/sidebyside.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
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(""); } |
