MCPcopy Create free account
hub / github.com/Tencent/TAD_Sim / cJSON_CreateFloatArray

Function cJSON_CreateFloatArray

common/map_sdk/transmission/src/cJSON.cpp:847–860  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

845 return a;
846}
847cJSON *cJSON_CreateFloatArray(float *numbers, int count) {
848 int i;
849 cJSON *n = 0, *p = 0, *a = cJSON_CreateArray();
850 for (i = 0; a && i < count; i++) {
851 n = cJSON_CreateDouble((long double)numbers[i], -1);
852 if (!i) {
853 a->child = n;
854 } else {
855 suffix_object(p, n);
856 }
857 p = n;
858 }
859 return a;
860}
861cJSON *cJSON_CreateDoubleArray(double *numbers, int count) {
862 int i;
863 cJSON *n = 0, *p = 0, *a = cJSON_CreateArray();

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