diff options
| author | Tyge Løvset <[email protected]> | 2021-11-03 13:11:56 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2021-11-03 13:11:56 +0100 |
| commit | 27a6860137499e71eb23c1930ebe6e992baece12 (patch) | |
| tree | e3df57ba03d38535b91e6451faa333454ebc2406 /examples | |
| parent | 99979df6c500dbdea0ea7e202c7076db529d7e42 (diff) | |
| download | STC-modified-27a6860137499e71eb23c1930ebe6e992baece12.tar.gz STC-modified-27a6860137499e71eb23c1930ebe6e992baece12.zip | |
Changed carrN_X_at() to return const value*. Added mutable carrN_X_elem().
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/complex.c | 8 |
1 files changed, 4 insertions, 4 deletions
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
}
|
