Compatibility with Apple TVOS

Summary: This diff adds compatibility with Apple TVOS Buck build for CSSLayout library. Warning fixes are needed to ensure correct build

Reviewed By: emilsjolander

Differential Revision: D4001901

fbshipit-source-id: f095b4ac0ba91addb28d877b411ec27ecff4aad6
This commit is contained in:
Georgiy Kassabli
2016-10-13 10:46:22 -07:00
committed by Facebook Github Bot
parent 7548164edb
commit 203e3dc9b8

View File

@@ -100,6 +100,8 @@ typedef struct CSSNode {
void *context; void *context;
} CSSNode; } CSSNode;
static void _CSSNodeMarkDirty(const CSSNodeRef node);
static float static float
computedEdgeValue(const float edges[CSSEdgeCount], const CSSEdge edge, const float defaultValue) { computedEdgeValue(const float edges[CSSEdgeCount], const CSSEdge edge, const float defaultValue) {
CSS_ASSERT(edge <= CSSEdgeEnd, "Cannot get computed value of multi-edge shorthands"); CSS_ASSERT(edge <= CSSEdgeEnd, "Cannot get computed value of multi-edge shorthands");
@@ -131,7 +133,7 @@ computedEdgeValue(const float edges[CSSEdgeCount], const CSSEdge edge, const flo
static int32_t gNodeInstanceCount = 0; static int32_t gNodeInstanceCount = 0;
CSSNodeRef CSSNodeNew() { CSSNodeRef CSSNodeNew(void) {
const CSSNodeRef node = calloc(1, sizeof(CSSNode)); const CSSNodeRef node = calloc(1, sizeof(CSSNode));
CSS_ASSERT(node, "Could not allocate memory for node"); CSS_ASSERT(node, "Could not allocate memory for node");
gNodeInstanceCount++; gNodeInstanceCount++;
@@ -155,7 +157,7 @@ void CSSNodeFreeRecursive(const CSSNodeRef root) {
CSSNodeFree(root); CSSNodeFree(root);
} }
int32_t CSSNodeGetInstanceCount() { int32_t CSSNodeGetInstanceCount(void) {
return gNodeInstanceCount; return gNodeInstanceCount;
} }