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

Function cJSON_CreateFloatArray

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

Source from the content-addressed store, hash-verified

1066 return a;
1067}
1068cJSON *cJSON_CreateFloatArray(float *numbers, int count)
1069{
1070 int i;
1071 cJSON *n = 0, *p = 0, *a = cJSON_CreateArray();
1072 for (i = 0; a && i < count; i++)
1073 {
1074 n = cJSON_CreateDouble((long double)numbers[i], -1);
1075 if (!i)
1076 a->child = n;
1077 else
1078 suffix_object(p, n);
1079 p = n;
1080 }
1081 return a;
1082}
1083cJSON *cJSON_CreateDoubleArray(double *numbers, int count)
1084{
1085 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