diff options
| author | tylov <[email protected]> | 2023-07-21 11:22:48 +0200 |
|---|---|---|
| committer | tylov <[email protected]> | 2023-07-21 11:22:48 +0200 |
| commit | f3794f2b86b6f7f85096a0c2e9ca5720aed53300 (patch) | |
| tree | a96e759baf995559cab0a6e32160621015276158 /misc | |
| parent | dbcc13635402bd466675f4f41e865d02abc6f918 (diff) | |
| download | STC-modified-f3794f2b86b6f7f85096a0c2e9ca5720aed53300.tar.gz STC-modified-f3794f2b86b6f7f85096a0c2e9ca5720aed53300.zip | |
Removed c_foreach_rv() - only worked for cvec, so not general.
Diffstat (limited to 'misc')
| -rw-r--r-- | misc/examples/algorithms/forloops.c | 4 | ||||
| -rw-r--r-- | misc/examples/linkedlists/list.c | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/misc/examples/algorithms/forloops.c b/misc/examples/algorithms/forloops.c index 300eee18..a83d4a53 100644 --- a/misc/examples/algorithms/forloops.c +++ b/misc/examples/algorithms/forloops.c @@ -41,10 +41,6 @@ int main(void) c_foreach (i, IVec, vec) printf(" %d", *i.ref); - puts("\n\nc_foreach_r: reverse"); - c_foreach_rv (i, IVec, vec) - printf(" %d", *i.ref); - puts("\n\nc_foreach in map:"); c_foreach (i, IMap, map) printf(" (%d %d)", i.ref->first, i.ref->second); diff --git a/misc/examples/linkedlists/list.c b/misc/examples/linkedlists/list.c index 09591314..518cc09b 100644 --- a/misc/examples/linkedlists/list.c +++ b/misc/examples/linkedlists/list.c @@ -12,10 +12,10 @@ int main(void) { const int n = 3000000; DList list = {0}; - crand_t rng = crand_init(1234567); + csrand(1234567); int m = 0; c_forrange (n) - DList_push_back(&list, crand_f64(&rng)*n + 100), ++m; + DList_push_back(&list, crandf()*n + 100), ++m; double sum = 0.0; printf("sumarize %d:\n", m); |
