From 8e2e792b2c3e1fa04a0ac67ea7d9010939ca8009 Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Mon, 13 Sep 2021 14:52:05 +0200 Subject: Removed most of the case-insensitive cstr methods, as they won't work with utf-8. --- examples/mapmap.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'examples') diff --git a/examples/mapmap.c b/examples/mapmap.c index b7dd8afb..b158b96a 100644 --- a/examples/mapmap.c +++ b/examples/mapmap.c @@ -18,10 +18,9 @@ int main(void) { c_forauto (cmap_cfg, cfg) { - cmap_str init = cmap_str_init(); - cmap_cfg_insert(&cfg, cstr_from("user"), init); - cmap_cfg_insert(&cfg, cstr_from("group"), init); - cmap_cfg_insert(&cfg, cstr_from("admin"), init); + cmap_cfg_insert(&cfg, cstr_from("user"), cmap_str_init()); + cmap_cfg_insert(&cfg, cstr_from("group"), cmap_str_init()); + cmap_cfg_insert(&cfg, cstr_from("admin"), cmap_str_init()); cmap_str_emplace(cmap_cfg_at(&cfg, "user"), "name", "Joe"); cmap_str_emplace(cmap_cfg_at(&cfg, "user"), "groups", "proj1,proj3"); @@ -34,6 +33,7 @@ int main(void) c_foreach (i, cmap_cfg, cfg) c_foreach (j, cmap_str, i.ref->second) - printf("%s: %s - %s (%u)\n", i.ref->first.str, j.ref->first.str, j.ref->second.str, i.ref->second.bucket_count); + printf("%s: %s - %s (%u)\n", i.ref->first.str, j.ref->first.str, j.ref->second.str, + i.ref->second.bucket_count); } } \ No newline at end of file -- cgit v1.2.3