Added default constructor for YGCachedMeasurement
Reviewed By: emilsjolander Differential Revision: D7020337 fbshipit-source-id: e084e234bf6a2ae22e53e739959683abca169b88
This commit is contained in:
parent
c75ce8146f
commit
22cf81571b
|
@ -26,14 +26,7 @@ YGLayout::YGLayout()
|
|||
nextCachedMeasurementsIndex(0),
|
||||
cachedMeasurements(),
|
||||
measuredDimensions(kYGDefaultDimensionValues),
|
||||
cachedLayout({
|
||||
.availableWidth = 0,
|
||||
.availableHeight = 0,
|
||||
.widthMeasureMode = (YGMeasureMode)-1,
|
||||
.heightMeasureMode = (YGMeasureMode)-1,
|
||||
.computedWidth = -1,
|
||||
.computedHeight = -1,
|
||||
}),
|
||||
cachedLayout(YGCachedMeasurement()),
|
||||
didUseLegacyFlag(false),
|
||||
doesLegacyStretchFlagAffectsLayout(false) {}
|
||||
|
||||
|
|
|
@ -50,6 +50,14 @@ struct YGCachedMeasurement {
|
|||
float computedWidth;
|
||||
float computedHeight;
|
||||
|
||||
YGCachedMeasurement()
|
||||
: availableWidth(0),
|
||||
availableHeight(0),
|
||||
widthMeasureMode((YGMeasureMode)-1),
|
||||
heightMeasureMode((YGMeasureMode)-1),
|
||||
computedWidth(-1),
|
||||
computedHeight(-1) {}
|
||||
|
||||
bool operator==(YGCachedMeasurement measurement) const {
|
||||
bool isEqual = widthMeasureMode == measurement.widthMeasureMode &&
|
||||
heightMeasureMode == measurement.heightMeasureMode;
|
||||
|
|
Loading…
Reference in New Issue