From cd51563000fdb3beae6a4c55fb95d903f8641583 Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Mon, 24 May 2021 19:28:39 +0200 Subject: Last cleanup of c_forvar()/c_fordefer() macro. --- docs/csmap_api.md | 8 ++++---- 1 file 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) -- cgit v1.2.3