MCPcopy Create free account
hub / github.com/OpenDriveLab/OpenLane / cJSON_CreateDoubleArray

Function cJSON_CreateDoubleArray

eval/LANE_evaluation/lane2d/src/cJSON.c:1083–1097  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1081 return a;
1082}
1083cJSON *cJSON_CreateDoubleArray(double *numbers, int count)
1084{
1085 int i;
1086 cJSON *n = 0, *p = 0, *a = cJSON_CreateArray();
1087 for (i = 0; a && i < count; i++)
1088 {
1089 n = cJSON_CreateDouble((long double)numbers[i], -1);
1090 if (!i)
1091 a->child = n;
1092 else
1093 suffix_object(p, n);
1094 p = n;
1095 }
1096 return a;
1097}
1098cJSON *cJSON_CreateStringArray(const char **strings, int count)
1099{
1100 int i;

Callers

nothing calls this directly

Calls 3

cJSON_CreateArrayFunction · 0.85
cJSON_CreateDoubleFunction · 0.85
suffix_objectFunction · 0.85

Tested by

no test coverage detected