From 7a30e2853792870a1d85087861e46a1ae1ca6b0e Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Wed, 22 Dec 2021 09:14:44 +0100 Subject: Minor example update. --- examples/sidebyside.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/examples/sidebyside.cpp b/examples/sidebyside.cpp index 85fea774..435b37f6 100644 --- a/examples/sidebyside.cpp +++ b/examples/sidebyside.cpp @@ -8,11 +8,12 @@ #define i_key int #define i_val int -#include +#include int main() { { - std::map food = {{"burger", 5}, {"pizza", 12}, {"steak", 15}}; + std::map food = + {{"burger", 5}, {"pizza", 12}, {"steak", 15}}; for (auto i: food) std::cout << i.first << ", " << i.second << std::endl; std::cout << std::endl; @@ -35,12 +36,12 @@ int main() { std::cout << i.first << ", " << i.second << std::endl; std::cout << std::endl; } - c_auto (cmap_int, hist) + c_auto (csmap_int, hist) { - ++ cmap_int_emplace(&hist, 12, 100).ref->second; - ++ cmap_int_emplace(&hist, 13, 100).ref->second; - ++ cmap_int_emplace(&hist, 12, 100).ref->second; - c_foreach (i, cmap_int, hist) + ++ csmap_int_emplace(&hist, 12, 100).ref->second; + ++ csmap_int_emplace(&hist, 13, 100).ref->second; + ++ csmap_int_emplace(&hist, 12, 100).ref->second; + c_foreach (i, csmap_int, hist) printf("%d, %d\n", i.ref->first, i.ref->second); puts(""); } -- cgit v1.2.3