Declaratively initialize default values of nodes

Summary: Improve performance of allocations and reseting by writing fewer bits. Also just looks nicer imho.

Reviewed By: passy

Differential Revision: D4356994

fbshipit-source-id: ebbe52163e0c86230bfa4131b657941afe16fbf1
This commit is contained in:
Emil Sjolander
2016-12-22 02:57:21 -08:00
committed by Facebook Github Bot
parent ff1a0e1eb8
commit 0df58d8aa2
2 changed files with 64 additions and 60 deletions

View File

@@ -56,7 +56,7 @@ TEST(YogaTest, memory_func_test_funcs) {
}
YGNodeFreeRecursive(root);
ASSERT_NE(testMallocCount, 0);
ASSERT_NE(testCallocCount, 0);
ASSERT_EQ(testCallocCount, 0);
ASSERT_NE(testReallocCount, 0);
ASSERT_NE(testFreeCount, 0);
YGSetMemoryFuncs(NULL, NULL, NULL, NULL);