Change the type of aspect Ratio to YGFloatOptional
Summary: Change the type of aspect Ratio to YGFloatOptional Reviewed By: emilsjolander Differential Revision: D7302651 fbshipit-source-id: 53e3b4c9627207a379f927b1f3485e36a9c70601
This commit is contained in:
committed by
Facebook Github Bot
parent
fe433b012f
commit
d85e2ee9c3
@@ -50,7 +50,7 @@ YGStyle::YGStyle()
|
||||
dimensions(kYGDefaultDimensionValuesAutoUnit),
|
||||
minDimensions(kYGDefaultDimensionValuesUnit),
|
||||
maxDimensions(kYGDefaultDimensionValuesUnit),
|
||||
aspectRatio(YGUndefined) {}
|
||||
aspectRatio(YGFloatOptional()) {}
|
||||
|
||||
// Yoga specific properties, not compatible with flexbox specification
|
||||
bool YGStyle::operator==(const YGStyle& style) {
|
||||
@@ -91,10 +91,9 @@ bool YGStyle::operator==(const YGStyle& style) {
|
||||
flexShrink.getValue() == style.flexShrink.getValue();
|
||||
}
|
||||
|
||||
if (!(YGFloatIsUndefined(aspectRatio) &&
|
||||
YGFloatIsUndefined(style.aspectRatio))) {
|
||||
areNonFloatValuesEqual =
|
||||
areNonFloatValuesEqual && aspectRatio == style.aspectRatio;
|
||||
if (!(aspectRatio.isUndefined() && style.aspectRatio.isUndefined())) {
|
||||
areNonFloatValuesEqual = areNonFloatValuesEqual &&
|
||||
aspectRatio.getValue() == style.aspectRatio.getValue();
|
||||
}
|
||||
|
||||
return areNonFloatValuesEqual;
|
||||
|
Reference in New Issue
Block a user