diff options
| author | tylo <[email protected]> | 2020-09-08 13:23:09 +0200 |
|---|---|---|
| committer | tylo <[email protected]> | 2020-09-08 13:23:09 +0200 |
| commit | 1f3545e681a0fa68608760d5ec7b555e41d35c77 (patch) | |
| tree | 323798c5c2431150a474f7a39cb9c7a741bfc47e /examples | |
| parent | 708f45220329f4e23b1671cb1b18c37f98232bff (diff) | |
| download | STC-modified-1f3545e681a0fa68608760d5ec7b555e41d35c77.tar.gz STC-modified-1f3545e681a0fa68608760d5ec7b555e41d35c77.zip | |
changed c_foreach() macro -> Removed cnt_range() methods, and simplified iters.
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/demos.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/demos.c b/examples/demos.c index c0c5de18..21d9efaa 100644 --- a/examples/demos.c +++ b/examples/demos.c @@ -73,7 +73,7 @@ void vectordemo2() cvec_str_destroy(&names);
}
-declare_clist(ix, int);
+declare_clist(ix, int);
void listdemo1()
{
@@ -140,7 +140,7 @@ void mapdemo2() cmap_si_put(&nums, "Groovy", 200); // overwrite previous
// iterate the map:
- for (cmap_si_iter_t i = cmap_si_begin(&nums); i.item != i.end; cmap_si_next(&i))
+ for (cmap_si_iter_t i = cmap_si_begin(&nums), ie = cmap_si_end(&nums); i.item != ie.item; cmap_si_next(&i))
printf("long: %s: %d\n", i.item->key.str, i.item->value);
// or rather use the short form:
@@ -151,7 +151,7 @@ void mapdemo2() }
-declare_cmap_str();
+declare_cmap_str();
void mapdemo3()
{
@@ -210,5 +210,5 @@ int main() mapdemo1();
mapdemo2();
mapdemo3();
- arraydemo1();
+ arraydemo1();
}
|
