Replaced default constructors with member assignments
Reviewed By: davidaurelio Differential Revision: D10466125 fbshipit-source-id: ed92d1e054a8b5b9a6c8c09035173b11da45c368
This commit is contained in:
committed by
Facebook Github Bot
parent
ba9bd4eae3
commit
fad2ee1a64
@@ -7,51 +7,6 @@
|
||||
*/
|
||||
#include "YGStyle.h"
|
||||
|
||||
const YGValue kYGValueUndefined = {0, YGUnitUndefined};
|
||||
|
||||
const YGValue kYGValueAuto = {0, YGUnitAuto};
|
||||
|
||||
const std::array<YGValue, YGEdgeCount> kYGDefaultEdgeValuesUnit = {
|
||||
{kYGValueUndefined,
|
||||
kYGValueUndefined,
|
||||
kYGValueUndefined,
|
||||
kYGValueUndefined,
|
||||
kYGValueUndefined,
|
||||
kYGValueUndefined,
|
||||
kYGValueUndefined,
|
||||
kYGValueUndefined,
|
||||
kYGValueUndefined}};
|
||||
|
||||
const std::array<YGValue, 2> kYGDefaultDimensionValuesAutoUnit = {
|
||||
{kYGValueAuto, kYGValueAuto}};
|
||||
|
||||
const std::array<YGValue, 2> kYGDefaultDimensionValuesUnit = {
|
||||
{kYGValueUndefined, kYGValueUndefined}};
|
||||
|
||||
YGStyle::YGStyle()
|
||||
: direction(YGDirectionInherit),
|
||||
flexDirection(YGFlexDirectionColumn),
|
||||
justifyContent(YGJustifyFlexStart),
|
||||
alignContent(YGAlignFlexStart),
|
||||
alignItems(YGAlignStretch),
|
||||
alignSelf(YGAlignAuto),
|
||||
positionType(YGPositionTypeRelative),
|
||||
flexWrap(YGWrapNoWrap),
|
||||
overflow(YGOverflowVisible),
|
||||
display(YGDisplayFlex),
|
||||
flex(YGFloatOptional()),
|
||||
flexGrow(YGFloatOptional()),
|
||||
flexShrink(YGFloatOptional()),
|
||||
flexBasis(kYGValueAuto),
|
||||
margin(kYGDefaultEdgeValuesUnit),
|
||||
position(kYGDefaultEdgeValuesUnit),
|
||||
padding(kYGDefaultEdgeValuesUnit),
|
||||
border(kYGDefaultEdgeValuesUnit),
|
||||
dimensions(kYGDefaultDimensionValuesAutoUnit),
|
||||
minDimensions(kYGDefaultDimensionValuesUnit),
|
||||
maxDimensions(kYGDefaultDimensionValuesUnit),
|
||||
aspectRatio(YGFloatOptional()) {}
|
||||
|
||||
// Yoga specific properties, not compatible with flexbox specification
|
||||
bool YGStyle::operator==(const YGStyle& style) {
|
||||
bool areNonFloatValuesEqual = direction == style.direction &&
|
||||
|
Reference in New Issue
Block a user