From d950dc6a21c5cc1e736993b2ecc16abae086389e Mon Sep 17 00:00:00 2001 From: Pritesh Nandgaonkar Date: Tue, 21 Nov 2017 03:31:17 -0800 Subject: [PATCH] Deleted YGSetMemoryFucs as it is unused Reviewed By: emilsjolander Differential Revision: D6374147 fbshipit-source-id: 8c896dce23571268a1a52df5cc72486af9d66df7 --- ReactCommon/yoga/yoga/Yoga.c | 20 -------------------- ReactCommon/yoga/yoga/Yoga.h | 3 --- 2 files changed, 23 deletions(-) diff --git a/ReactCommon/yoga/yoga/Yoga.c b/ReactCommon/yoga/yoga/Yoga.c index ac7fb1110..252c7efe2 100644 --- a/ReactCommon/yoga/yoga/Yoga.c +++ b/ReactCommon/yoga/yoga/Yoga.c @@ -3816,23 +3816,3 @@ void *YGConfigGetContext(const YGConfigRef config) { void YGConfigSetNodeClonedFunc(const YGConfigRef config, const YGNodeClonedFunc callback) { config->cloneNodeCallback = callback; } - -void YGSetMemoryFuncs(YGMalloc ygmalloc, YGCalloc yccalloc, YGRealloc ygrealloc, YGFree ygfree) { - YGAssert(gNodeInstanceCount == 0 && gConfigInstanceCount == 0, - "Cannot set memory functions: all node must be freed first"); - YGAssert((ygmalloc == NULL && yccalloc == NULL && ygrealloc == NULL && ygfree == NULL) || - (ygmalloc != NULL && yccalloc != NULL && ygrealloc != NULL && ygfree != NULL), - "Cannot set memory functions: functions must be all NULL or Non-NULL"); - - if (ygmalloc == NULL || yccalloc == NULL || ygrealloc == NULL || ygfree == NULL) { - gYGMalloc = &malloc; - gYGCalloc = &calloc; - gYGRealloc = &realloc; - gYGFree = &free; - } else { - gYGMalloc = ygmalloc; - gYGCalloc = yccalloc; - gYGRealloc = ygrealloc; - gYGFree = ygfree; - } -} diff --git a/ReactCommon/yoga/yoga/Yoga.h b/ReactCommon/yoga/yoga/Yoga.h index ae954c512..b10b954b5 100644 --- a/ReactCommon/yoga/yoga/Yoga.h +++ b/ReactCommon/yoga/yoga/Yoga.h @@ -279,7 +279,4 @@ WIN_EXPORT YGConfigRef YGConfigGetDefault(void); WIN_EXPORT void YGConfigSetContext(const YGConfigRef config, void *context); WIN_EXPORT void *YGConfigGetContext(const YGConfigRef config); -WIN_EXPORT void -YGSetMemoryFuncs(YGMalloc ygmalloc, YGCalloc yccalloc, YGRealloc ygrealloc, YGFree ygfree); - YG_EXTERN_C_END