Fix assertion preventing YGNodeLayoutGet* with YGEdgeEnd
Summary: Expected to be able to call `YGNodeLayoutGetMargin(node, YGEdgeEnd)`, but instead, the program aborts with `"Cannot get layout properties of multi-edge shorthands"`. This bug seems to incorrectly prevent properties from YGEdgeEnd for all Layout properties. Closes https://github.com/facebook/yoga/pull/632 Differential Revision: D6408060 Pulled By: emilsjolander fbshipit-source-id: 4ab3b2ffb2f1bb6fd3a27f780caf0123abcdb230
This commit is contained in:
committed by
Facebook Github Bot
parent
5502a97f7f
commit
55c767ba7f
@@ -659,8 +659,9 @@ static inline const YGValue *YGNodeResolveFlexBasisPtr(const YGNodeRef node) {
|
||||
|
||||
#define YG_NODE_LAYOUT_RESOLVED_PROPERTY_IMPL(type, name, instanceName) \
|
||||
type YGNodeLayoutGet##name(const YGNodeRef node, const YGEdge edge) { \
|
||||
YGAssertWithNode(node, \
|
||||
edge < YGEdgeEnd, \
|
||||
YGAssertWithNode( \
|
||||
node, \
|
||||
edge <= YGEdgeEnd, \
|
||||
"Cannot get layout properties of multi-edge shorthands"); \
|
||||
\
|
||||
if (edge == YGEdgeLeft) { \
|
||||
|
Reference in New Issue
Block a user