summaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2020-09-13 14:13:48 +0200
committerTyge Løvset <[email protected]>2020-09-13 14:13:48 +0200
commit4b4fdd3fb7ccad613e130b00ee03eef09007737a (patch)
tree91b3cd9b7da0dc74f52d6ecafe3eb67f30f5a340 /examples
parentb3a1581b7dabd0fe8989f605bdcf1fee93f657d9 (diff)
downloadSTC-modified-4b4fdd3fb7ccad613e130b00ee03eef09007737a.tar.gz
STC-modified-4b4fdd3fb7ccad613e130b00ee03eef09007737a.zip
Changed cmap_insert API to take a pair. cset_insert unchanged.
Diffstat (limited to 'examples')
-rw-r--r--examples/README.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/README.md b/examples/README.md
index 7947f16c..0cdefd55 100644
--- a/examples/README.md
+++ b/examples/README.md
@@ -69,7 +69,7 @@ int main() {
VikingVw look = {"Einar", "Norway"};
cmap_vk_entry_t *e = cmap_vk_find(&vikings, look);
e->value += 5; // update
- cmap_vk_insert(&vikings, look, 0)->value += 5; // again
+ cmap_vk_emplace(&vikings, look, 0)->value += 5; // again
c_foreach (k, cmap_vk, vikings) {
printf("%s of %s has %d hp\n", k.item->key.name.str, k.item->key.country.str, k.item->value);