Updated the implementation of leading padding
Summary: Changed the arguments for the getter of leading padding to avoid copies. Added an assetion in getter of leading padding, as padding would always be defined even in the case when the user has not explicitly defined the value. In these cases it would take the default value of 0. So changing the type of `getLayoutPadding` to `YGFloatOptional`, doesn't make sense. Reviewed By: emilsjolander Differential Revision: D7336690 fbshipit-source-id: b2a2f010026f26fc2cc9fb35ad921da8f7017c9f
This commit is contained in:
committed by
Facebook Github Bot
parent
a3642541d0
commit
3e322e60e4
@@ -65,6 +65,10 @@ bool YGFloatsEqual(const float a, const float b);
|
||||
// compiler flag.
|
||||
float YGFloatMax(const float a, const float b);
|
||||
|
||||
YGFloatOptional YGFloatOptionalMax(
|
||||
const YGFloatOptional& op1,
|
||||
const YGFloatOptional& op2);
|
||||
|
||||
// We need custom min function, since we want that, if one argument is
|
||||
// YGUndefined then the min funtion should return the other argument as the min
|
||||
// value. We wouldn't have needed a custom min function if YGUndefined was NAN
|
||||
|
Reference in New Issue
Block a user