diff options
| author | Tyge Løvset <[email protected]> | 2023-01-31 18:55:08 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2023-01-31 18:55:08 +0100 |
| commit | b677a0c3950b8294ba6458e682a885351273ac08 (patch) | |
| tree | f309f7f7571fb588f0f65254d17fa09d678a8e3c /misc/examples/demos.c | |
| parent | a24ecd6bbfffc2e0b75b8ed48fcb5306d367ad3e (diff) | |
| download | STC-modified-b677a0c3950b8294ba6458e682a885351273ac08.tar.gz STC-modified-b677a0c3950b8294ba6458e682a885351273ac08.zip | |
Converted all containers but the maps and examples to signed sizes and indices.
Diffstat (limited to 'misc/examples/demos.c')
| -rw-r--r-- | misc/examples/demos.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/misc/examples/demos.c b/misc/examples/demos.c index c92f95b2..898c24cf 100644 --- a/misc/examples/demos.c +++ b/misc/examples/demos.c @@ -38,7 +38,7 @@ void vectordemo1() c_WITH (cvec_ix bignums = cvec_ix_with_capacity(100), cvec_ix_drop(&bignums)) { cvec_ix_reserve(&bignums, 100); - for (size_t i = 10; i <= 100; i += 10) + for (int i = 10; i <= 100; i += 10) cvec_ix_push(&bignums, i * i); printf("erase - %d: %" PRIu64 "\n", 3, bignums.data[3]); @@ -47,8 +47,8 @@ void vectordemo1() cvec_ix_pop(&bignums); // erase the last cvec_ix_erase_n(&bignums, 0, 1); // erase the first - for (size_t i = 0; i < cvec_ix_size(&bignums); ++i) { - printf("%" c_ZU ": %" PRIu64 "\n", i, bignums.data[i]); + for (int i = 0; i < cvec_ix_size(&bignums); ++i) { + printf("%d: %" PRIu64 "\n", i, bignums.data[i]); } } } |
