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),
|
nextCachedMeasurementsIndex(0),
|
||||||
cachedMeasurements(),
|
cachedMeasurements(),
|
||||||
measuredDimensions(kYGDefaultDimensionValues),
|
measuredDimensions(kYGDefaultDimensionValues),
|
||||||
cachedLayout({
|
cachedLayout(YGCachedMeasurement()),
|
||||||
.availableWidth = 0,
|
|
||||||
.availableHeight = 0,
|
|
||||||
.widthMeasureMode = (YGMeasureMode)-1,
|
|
||||||
.heightMeasureMode = (YGMeasureMode)-1,
|
|
||||||
.computedWidth = -1,
|
|
||||||
.computedHeight = -1,
|
|
||||||
}),
|
|
||||||
didUseLegacyFlag(false),
|
didUseLegacyFlag(false),
|
||||||
doesLegacyStretchFlagAffectsLayout(false) {}
|
doesLegacyStretchFlagAffectsLayout(false) {}
|
||||||
|
|
||||||
|
|
|
@ -50,6 +50,14 @@ struct YGCachedMeasurement {
|
||||||
float computedWidth;
|
float computedWidth;
|
||||||
float computedHeight;
|
float computedHeight;
|
||||||
|
|
||||||
|
YGCachedMeasurement()
|
||||||
|
: availableWidth(0),
|
||||||
|
availableHeight(0),
|
||||||
|
widthMeasureMode((YGMeasureMode)-1),
|
||||||
|
heightMeasureMode((YGMeasureMode)-1),
|
||||||
|
computedWidth(-1),
|
||||||
|
computedHeight(-1) {}
|
||||||
|
|
||||||
bool operator==(YGCachedMeasurement measurement) const {
|
bool operator==(YGCachedMeasurement measurement) const {
|
||||||
bool isEqual = widthMeasureMode == measurement.widthMeasureMode &&
|
bool isEqual = widthMeasureMode == measurement.widthMeasureMode &&
|
||||||
heightMeasureMode == measurement.heightMeasureMode;
|
heightMeasureMode == measurement.heightMeasureMode;
|
||||||
|
|
Loading…
Reference in New Issue