| 3093 | cJSON *a_element = NULL; |
| 3094 | cJSON *b_element = NULL; |
| 3095 | cJSON_ArrayForEach(a_element, a) |
| 3096 | { |
| 3097 | /* TODO This has O(n^2) runtime, which is horrible! */ |
| 3098 | b_element = get_object_item(b, a_element->string, case_sensitive); |
| 3099 | if (b_element == NULL) |
| 3100 | { |
| 3101 | return false; |
| 3102 | } |
| 3103 | |
| 3104 | if (!cJSON_Compare(a_element, b_element, case_sensitive)) |
| 3105 | { |
| 3106 | return false; |
| 3107 | } |
| 3108 | } |
| 3109 | |
| 3110 | /* doing this twice, once on a and b to prevent true comparison if a subset of b |
| 3111 | * TODO: Do this the proper way, this is just a fix for now */ |
nothing calls this directly
no test coverage detected