summaryrefslogtreecommitdiffhomepage
path: root/docs
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2021-05-24 19:28:39 +0200
committerTyge Løvset <[email protected]>2021-05-24 19:28:39 +0200
commitcd51563000fdb3beae6a4c55fb95d903f8641583 (patch)
treea6fd7a251425434d03a1cc3662c7b961ecc5a9c4 /docs
parent935654467bc53ab93cff4e66bda09a173fc5bbac (diff)
downloadSTC-modified-cd51563000fdb3beae6a4c55fb95d903f8641583.tar.gz
STC-modified-cd51563000fdb3beae6a4c55fb95d903f8641583.zip
Last cleanup of c_forvar()/c_fordefer() macro.
Diffstat (limited to 'docs')
-rw-r--r--docs/csmap_api.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/csmap_api.md b/docs/csmap_api.md
index 1402bd78..8e152497 100644
--- a/docs/csmap_api.md
+++ b/docs/csmap_api.md
@@ -152,13 +152,13 @@ int main()
{100, "Red"},
{110, "Blue"},
});
- c_forvar (csmap_id_del(&idnames))
+ c_fordefer (csmap_id_del(&idnames))
{
- /* put replaces existing mapped value: */
+ // put replaces existing mapped value:
csmap_id_emplace_or_assign(&idnames, 110, "White");
- /* put a constructed mapped value into map: */
+ // put a constructed mapped value into map:
csmap_id_insert_or_assign(&idnames, 120, cstr_from_fmt("#%08x", col));
- /* emplace adds only when key does not exist: */
+ // emplace adds only when key does not exist:
csmap_id_emplace(&idnames, 100, "Green");
c_foreach (i, csmap_id, idnames)