diff options
| author | Tyge Løvset <[email protected]> | 2023-01-06 11:40:41 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2023-01-06 11:40:41 +0100 |
| commit | 7abea5ab04bffebbedfad7bd8d9c5c26170d19af (patch) | |
| tree | 25f1aa511aa27198c31b7bad13ae137dd52828ad /misc/examples/lower_bound.c | |
| parent | dd1ac09cd54e2632ec9d272ec578cde67a5edd01 (diff) | |
| download | STC-modified-7abea5ab04bffebbedfad7bd8d9c5c26170d19af.tar.gz STC-modified-7abea5ab04bffebbedfad7bd8d9c5c26170d19af.zip | |
Removed swap() function from all containers. Use safe c_SWAP() macro instead.
Diffstat (limited to 'misc/examples/lower_bound.c')
| -rw-r--r-- | misc/examples/lower_bound.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/misc/examples/lower_bound.c b/misc/examples/lower_bound.c index dde9d93a..8d048e7c 100644 --- a/misc/examples/lower_bound.c +++ b/misc/examples/lower_bound.c @@ -25,12 +25,12 @@ int main() key = 10; cvec_int_iter it1 = cvec_int_lower_bound(&vec, key); - if (res) + if (it1.ref) printf("Sorted Vec %3d: lower_bound: %d\n", key, *it1.ref); // 30 key = 600; cvec_int_iter it2 = cvec_int_binary_search(&vec, key); - if (res) + if (it2.ref) printf("Sorted Vec %d: bin. search: %d\n", key, *it2.ref); // 600 c_FOREACH (i, cvec_int, it1, it2) @@ -54,12 +54,12 @@ int main() key = 10; csset_int_iter it1 = csset_int_lower_bound(&set, key); - if (res) + if (it1.ref) printf("Sorted Set %3d: lower bound: %d\n", key, *it1.ref); // 30 key = 600; csset_int_iter it2 = csset_int_find(&set, key); - if (res) + if (it2.ref) printf("Sorted Set %d: find : %d\n", key, *it2.ref); // 600 c_FOREACH (i, csset_int, it1, it2) |
