Merge remote-tracking branch 'origin/refactor-lcid-gnb-mac' into integration_2024_w21c

This commit is contained in:
Robert Schmidt
2024-05-24 17:54:32 +02:00
14 changed files with 220 additions and 205 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ elm_arr_t find_if_arr_it(seq_arr_t* arr, void* start_it, void* end_it, void* val
return (elm_arr_t){.found = false, .it = NULL};
}
elm_arr_t find_if_arr(seq_arr_t* arr, void* value, bool (*f)(const void*, const void*))
elm_arr_t find_if(seq_arr_t* arr, void* value, bool (*f)(const void*, const void*))
{
assert(arr != NULL);
void* start_it = seq_arr_front(arr);
+1 -1
View File
@@ -42,7 +42,7 @@ typedef struct {
* @param f Function representing the predicate
* @return Whether the predicate was fullfilled and the iterator to the element if true
*/
elm_arr_t find_if_arr(seq_arr_t* arr, void* value, bool (*f)(const void* value, const void* it));
elm_arr_t find_if(seq_arr_t* arr, void* value, bool (*f)(const void* value, const void* it));
/**
* @brief Find elements in an array in the semi-open range [start_it, end_it)
+1 -1
View File
@@ -52,7 +52,7 @@ int main()
// Find element in the array
int value = 50;
elm_arr_t elm = find_if_arr(&arr, &value, eq_int);
elm_arr_t elm = find_if(&arr, &value, eq_int);
assert(elm.found == true);
// Check
assert(*(int*)elm.it == 50);