diff options
| author | Tyge Løvset <[email protected]> | 2022-08-07 08:03:46 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2022-08-07 08:20:34 +0200 |
| commit | c87898773d1af364a9847610401a9959f6019fe7 (patch) | |
| tree | 5e64c9d96fb9e12192ce298f1d2909d43b72571a /docs/cmap_api.md | |
| parent | 618b5704e6f85cfe1b6e5c9c9373abe76a8bb628 (diff) | |
| download | STC-modified-c87898773d1af364a9847610401a9959f6019fe7.tar.gz STC-modified-c87898773d1af364a9847610401a9959f6019fe7.zip | |
Internal: moved some functions in csview/cstr to implementation sections.
Diffstat (limited to 'docs/cmap_api.md')
| -rw-r--r-- | docs/cmap_api.md | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/docs/cmap_api.md b/docs/cmap_api.md index 8fbfb30b..717e7677 100644 --- a/docs/cmap_api.md +++ b/docs/cmap_api.md @@ -398,13 +398,11 @@ static inline RViking Viking_toraw(const Viking* vp) { int main() { c_auto (Vikings, vikings) { - Vikings_raw arr[] = { - { {"Einar", "Norway"}, 20 }, - { {"Olaf", "Denmark"}, 24 }, - { {"Harald", "Iceland"}, 12 }, - }; - c_forrange (i, c_arraylen(arr)) - Vikings_emplace(&vikings, arr[i].first, arr[i].second); + c_forarray (Vikings_raw, v, { + {{"Einar", "Norway"}, 20}, + {{"Olaf", "Denmark"}, 24}, + {{"Harald", "Iceland"}, 12} + }) Vikings_emplace(&vikings, v->first, v->second); Vikings_emplace_or_assign(&vikings, (RViking){"Bjorn", "Sweden"}, 10); |
