From eb85069b669e754836b9d4587ba03d3af1a5e975 Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Sun, 26 Mar 2023 00:27:45 +0100 Subject: development branch for 4.2 Removed uses of c_auto and c_with in documentation examples and code examples. Still using c_defer a few places. Renamed c11/fmt.h to c11/print.h. Some additions in ccommon.h, e.g. c_const_cast(T, x). Improved docs. --- misc/examples/sorted_map.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'misc/examples/sorted_map.c') diff --git a/misc/examples/sorted_map.c b/misc/examples/sorted_map.c index c4a05c76..ae9b45a4 100644 --- a/misc/examples/sorted_map.c +++ b/misc/examples/sorted_map.c @@ -9,8 +9,11 @@ int main() { // empty map containers - c_auto (csmap_int, gquiz1, gquiz2) - { + csmap_int gquiz1 = {0}, gquiz2 = {0}; + c_defer( + csmap_int_drop(&gquiz1), + csmap_int_drop(&gquiz2) + ){ // insert elements in random order csmap_int_insert(&gquiz1, 2, 30); csmap_int_insert(&gquiz1, 4, 20); -- cgit v1.2.3