Store YGFloatOptional in 32 bits

Summary:
@public

After removing `-ffast-math`, `NaN` can again be used to represent `undefined`. That allows us to remove the additional flag from `YGFloatOptional`, and reduce memory usage.

Reviewed By: SidharthGuglani

Differential Revision: D13209157

fbshipit-source-id: 21b83c837a78f924a4ec23a9236ca2440b3c8606
This commit is contained in:
David Aurelio
2018-12-06 07:35:08 -08:00
committed by Facebook Github Bot
parent ed5c5a799f
commit ed3b54b603
4 changed files with 192 additions and 58 deletions

View File

@@ -211,7 +211,7 @@ YGFloatOptional YGNode::relativePosition(
YGFloatOptional trailingPosition = getTrailingPosition(axis, axisSize);
if (!trailingPosition.isUndefined()) {
trailingPosition.setValue(-1 * trailingPosition.getValue());
trailingPosition = YGFloatOptional{-1 * trailingPosition.getValue()};
}
return trailingPosition;
}