From 267e17f23a281bfe758d2d3d61b57e80fe6906c6 Mon Sep 17 00:00:00 2001 From: Emil Sjolander Date: Mon, 31 Oct 2016 11:04:48 -0700 Subject: [PATCH] void* -> CSSNodeRef in CSSNodeList Summary: This list can only contain CSSNodeRefs so don't use void* Reviewed By: gkassabli Differential Revision: D4101773 fbshipit-source-id: 8a5c9066da796967bd02ce6b1fc74ff40e15dfe1 --- CSSLayout/CSSNodeList.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CSSLayout/CSSNodeList.c b/CSSLayout/CSSNodeList.c index f9c27c18..c4b8f3c1 100644 --- a/CSSLayout/CSSNodeList.c +++ b/CSSLayout/CSSNodeList.c @@ -12,7 +12,7 @@ struct CSSNodeList { uint32_t capacity; uint32_t count; - void **items; + CSSNodeRef *items; }; CSSNodeListRef CSSNodeListNew(const uint32_t initialCapacity) { @@ -21,7 +21,7 @@ CSSNodeListRef CSSNodeListNew(const uint32_t initialCapacity) { list->capacity = initialCapacity; list->count = 0; - list->items = malloc(sizeof(void *) * list->capacity); + list->items = malloc(sizeof(CSSNodeRef) * list->capacity); CSS_ASSERT(list->items != NULL, "Could not allocate memory for items"); return list; @@ -56,7 +56,7 @@ void CSSNodeListInsert(CSSNodeListRef *listp, const CSSNodeRef node, const uint3 if (list->count == list->capacity) { list->capacity *= 2; - list->items = realloc(list->items, sizeof(void *) * list->capacity); + list->items = realloc(list->items, sizeof(CSSNodeRef) * list->capacity); CSS_ASSERT(list->items != NULL, "Could not extend allocation for items"); }