cJSONUtils_SortList -> sort_list

This commit is contained in:
Max Bruckner 2017-04-30 16:53:35 +02:00
parent a29c468b68
commit 23cbb173d4

View File

@ -1035,7 +1035,7 @@ CJSON_PUBLIC(cJSON *) cJSONUtils_GeneratePatches(cJSON * const from, cJSON * con
} }
/* sort lists using mergesort */ /* sort lists using mergesort */
static cJSON *cJSONUtils_SortList(cJSON *list) static cJSON *sort_list(cJSON *list)
{ {
cJSON *first = list; cJSON *first = list;
cJSON *second = list; cJSON *second = list;
@ -1080,8 +1080,8 @@ static cJSON *cJSONUtils_SortList(cJSON *list)
} }
/* Recursively sort the sub-lists. */ /* Recursively sort the sub-lists. */
first = cJSONUtils_SortList(first); first = sort_list(first);
second = cJSONUtils_SortList(second); second = sort_list(second);
result = NULL; result = NULL;
/* Merge the sub-lists */ /* Merge the sub-lists */
@ -1147,7 +1147,7 @@ static cJSON *cJSONUtils_SortList(cJSON *list)
CJSON_PUBLIC(void) cJSONUtils_SortObject(cJSON * const object) CJSON_PUBLIC(void) cJSONUtils_SortObject(cJSON * const object)
{ {
object->child = cJSONUtils_SortList(object->child); object->child = sort_list(object->child);
} }
CJSON_PUBLIC(cJSON *) cJSONUtils_MergePatch(cJSON *target, const cJSON * const patch) CJSON_PUBLIC(cJSON *) cJSONUtils_MergePatch(cJSON *target, const cJSON * const patch)