reformatting: cJSON_AddItemReferenceToObject

This commit is contained in:
Max Bruckner 2016-09-30 10:40:34 +07:00
parent 55e33d7100
commit b602ef1cd5
1 changed files with 5 additions and 1 deletions

View File

@ -1704,7 +1704,11 @@ void cJSON_AddItemReferenceToArray(cJSON *array, cJSON *item)
cJSON_AddItemToArray(array, create_reference(item));
}
void cJSON_AddItemReferenceToObject(cJSON *object,const char *string,cJSON *item) {cJSON_AddItemToObject(object,string,create_reference(item));}
void cJSON_AddItemReferenceToObject(cJSON *object, const char *string, cJSON *item)
{
cJSON_AddItemToObject(object, string, create_reference(item));
}
cJSON *cJSON_DetachItemFromArray(cJSON *array,int which) {cJSON *c=array->child;while (c && which>0) c=c->next,which--;if (!c) return 0;
if (c->prev) c->prev->next=c->next;if (c->next) c->next->prev=c->prev;if (c==array->child) array->child=c->next;c->prev=c->next=0;return c;}