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

Function cJSON_CreateIntArray

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

Create Arrays: */

Source from the content-addressed store, hash-verified

1051
1052/* Create Arrays: */
1053cJSON *cJSON_CreateIntArray(int *numbers, int sign, int count)
1054{
1055 int i;
1056 cJSON *n = 0, *p = 0, *a = cJSON_CreateArray();
1057 for (i = 0; a && i < count; i++)
1058 {
1059 n = cJSON_CreateDouble((long double)((unsigned int)numbers[i]), sign);
1060 if (!i)
1061 a->child = n;
1062 else
1063 suffix_object(p, n);
1064 p = n;
1065 }
1066 return a;
1067}
1068cJSON *cJSON_CreateFloatArray(float *numbers, int count)
1069{
1070 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