Changed the return type of YGResolveValueMargin to YGFloatOptional

Summary: Changed the return type of YGResolveValueMargin to YGFloatOptional

Reviewed By: emilsjolander

Differential Revision: D7304090

fbshipit-source-id: cbec03a9367cf34976d083ad475d4da0b736e6d2
This commit is contained in:
Pritesh Nandgaonkar
2018-04-03 14:56:34 -07:00
committed by Facebook Github Bot
parent 5730be093e
commit 4b760fa9bc
2 changed files with 11 additions and 8 deletions

View File

@@ -136,8 +136,9 @@ inline YGFlexDirection YGResolveFlexDirection(
return flexDirection;
}
static inline float YGResolveValueMargin(
static inline YGFloatOptional YGResolveValueMargin(
const YGValue value,
const float ownerSize) {
return value.unit == YGUnitAuto ? 0 : YGUnwrapFloatOptional(YGResolveValue(value, ownerSize));
return value.unit == YGUnitAuto ? YGFloatOptional(0)
: YGResolveValue(value, ownerSize);
}