summaryrefslogtreecommitdiffhomepage
path: root/examples/csmap_erase.c
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-08-06 17:48:06 +0200
committerTyge Løvset <[email protected]>2022-08-06 17:48:06 +0200
commit618b5704e6f85cfe1b6e5c9c9373abe76a8bb628 (patch)
tree4e25a538c8ba3fd58bb25b90ff6dc54adfb31aa4 /examples/csmap_erase.c
parent927fa8093ea0bc1e25586e60c47cf1dd8a311d9e (diff)
downloadSTC-modified-618b5704e6f85cfe1b6e5c9c9373abe76a8bb628.tar.gz
STC-modified-618b5704e6f85cfe1b6e5c9c9373abe76a8bb628.zip
c_apply() deprecated: replaced with c_forarray() macro. Updated and improved README.md docs.
Diffstat (limited to 'examples/csmap_erase.c')
-rw-r--r--examples/csmap_erase.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/csmap_erase.c b/examples/csmap_erase.c
index 37d25f37..1c533a99 100644
--- a/examples/csmap_erase.c
+++ b/examples/csmap_erase.c
@@ -36,14 +36,14 @@ int main()
c_auto (mymap, m2)
{
- // Fill in some data to test with, one at a time, using c_apply()
- c_apply(v, mymap_emplace(&m2, c_pair(v)), mymap_raw, {
+ // Fill in some data to test with, one at a time
+ c_forarray (mymap_raw, v, {
{10, "Bob"},
{11, "Rob"},
{12, "Robert"},
{13, "Bert"},
- {14, "Bobby"}
- });
+ {14, "Bobby"},
+ }) mymap_emplace(&m2, v->first, v->second);
puts("Starting data of map m2 is:");
printmap(m2);