From 27a6860137499e71eb23c1930ebe6e992baece12 Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Wed, 3 Nov 2021 13:11:56 +0100 Subject: Changed carrN_X_at() to return const value*. Added mutable carrN_X_elem(). --- examples/complex.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'examples') diff --git a/examples/complex.c b/examples/complex.c index 69900bba..32dd82eb 100644 --- a/examples/complex.c +++ b/examples/complex.c @@ -53,10 +53,10 @@ int main() { cmap_map_insert(&myMap, cstr_from(strKey), listMap); // Access the data entry - cmap_lst* mapL = &cmap_map_find(&myMap, strKey).ref->second; - clist_arr* lstA = &cmap_lst_find(mapL, tableKey).ref->second; - cstack_f arr = *clist_arr_back(lstA); - printf("value (%d) is: %f\n", x, arr.data[x]); + const cmap_lst* mapL = cmap_map_at(&myMap, strKey); + const clist_arr* lstA = cmap_lst_at(mapL, tableKey); + const cstack_f* arr = clist_arr_back(lstA); + printf("value (%d) is: %f\n", x, *cstack_f_at(arr, x)); stk.data[x] = 1.41421356f; // change the value in array } -- cgit v1.2.3