diff options
| author | Tyge Løvset <[email protected]> | 2021-03-11 11:29:57 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2021-03-11 11:29:57 +0100 |
| commit | c077e4b93a8d20c20b2626e2616d116be64247da (patch) | |
| tree | ad64f2bf54877fe2d47c54f0dbb7212277c87a28 /examples/mapmap.c | |
| parent | 87ae20d6192380d2da50d439b88f89b6ff64a433 (diff) | |
| download | STC-modified-c077e4b93a8d20c20b2626e2616d116be64247da.tar.gz STC-modified-c077e4b93a8d20c20b2626e2616d116be64247da.zip | |
Renamed public *_result_t struct member names in maps/sets for consistency with iterators.
Diffstat (limited to 'examples/mapmap.c')
| -rw-r--r-- | examples/mapmap.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/mapmap.c b/examples/mapmap.c index c775d870..e22ac80c 100644 --- a/examples/mapmap.c +++ b/examples/mapmap.c @@ -9,14 +9,14 @@ using_cmap_strkey(cfg, cmap_str, cmap_str_del, c_no_clone); int main(void) {
cmap_cfg config = cmap_cfg_init();
cmap_str init = cmap_str_init();
- cmap_str_emplace(&cmap_cfg_insert(&config, cstr_from("user"), init).first->second, "name", "Joe");
- cmap_str_emplace(&cmap_cfg_insert(&config, cstr_from("user"), init).first->second, "groups", "proj1,proj3");
- cmap_str_emplace(&cmap_cfg_insert(&config, cstr_from("group"), init).first->second, "proj1", "Energy");
- cmap_str_emplace(&cmap_cfg_insert(&config, cstr_from("group"), init).first->second, "proj2", "Windy");
- cmap_str_emplace(&cmap_cfg_insert(&config, cstr_from("group"), init).first->second, "proj3", "Oil");
- cmap_str_emplace(&cmap_cfg_insert(&config, cstr_from("admin"), init).first->second, "employees", "2302");
+ cmap_str_emplace(&cmap_cfg_insert(&config, cstr_from("user"), init).ref->second, "name", "Joe");
+ cmap_str_emplace(&cmap_cfg_insert(&config, cstr_from("user"), init).ref->second, "groups", "proj1,proj3");
+ cmap_str_emplace(&cmap_cfg_insert(&config, cstr_from("group"), init).ref->second, "proj1", "Energy");
+ cmap_str_emplace(&cmap_cfg_insert(&config, cstr_from("group"), init).ref->second, "proj2", "Windy");
+ cmap_str_emplace(&cmap_cfg_insert(&config, cstr_from("group"), init).ref->second, "proj3", "Oil");
+ cmap_str_emplace(&cmap_cfg_insert(&config, cstr_from("admin"), init).ref->second, "employees", "2302");
- cmap_str_emplace_or_assign(&cmap_cfg_insert(&config, cstr_from("group"), init).first->second, "proj2", "Wind"); // Update
+ cmap_str_emplace_or_assign(&cmap_cfg_insert(&config, cstr_from("group"), init).ref->second, "proj2", "Wind"); // Update
c_foreach (i, cmap_cfg, config)
c_foreach (j, cmap_str, i.ref->second)
|
