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

Function cJSON_CreateDouble

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

Source from the content-addressed store, hash-verified

791 return item;
792}
793cJSON *cJSON_CreateDouble(double num, int sign) {
794 cJSON *item = cJSON_New_Item();
795 if (item) {
796 item->type = cJSON_Double;
797 item->valuedouble = num;
798 item->valueint = static_cast<uint64>(num);
799 item->sign = sign;
800 }
801 return item;
802}
803cJSON *cJSON_CreateInt(uint64 num, int sign) {
804 cJSON *item = cJSON_New_Item();
805 if (item) {

Callers 6

cJSON_CreateIntArrayFunction · 0.85
cJSON_CreateFloatArrayFunction · 0.85
cJSON_CreateDoubleArrayFunction · 0.85
AddMethod · 0.85
ReplaceMethod · 0.85
AddAsFirstMethod · 0.85

Calls 1

cJSON_New_ItemFunction · 0.85

Tested by

no test coverage detected