Remove usage of Gutters arrays and YGGutter as index (#1406)
Summary: X-link: https://github.com/facebook/react-native/pull/39597 Pull Request resolved: https://github.com/facebook/yoga/pull/1406 Similar in vain to D49362819, we want to stop exposing pre-resolved CompactValue, and allow enum class usage without becoming annoying. This also simplifies gap resolution a bit. I moved this to Style, to make it clear we aren't relying on any node state. I plan to do some similar cleanup for other resolution later. Reviewed By: rshest Differential Revision: D49530923 fbshipit-source-id: 47b06a7301fb283acc493dba159f496159d59580
This commit is contained in:
committed by
Facebook GitHub Bot
parent
07cabca526
commit
4ef28bce24
@@ -191,14 +191,6 @@ class YG_EXPORT Node : public ::YGNode {
|
||||
YGEdge edge,
|
||||
CompactValue defaultValue);
|
||||
|
||||
static CompactValue computeRowGap(
|
||||
const Style::Gutters& gutters,
|
||||
CompactValue defaultValue);
|
||||
|
||||
static CompactValue computeColumnGap(
|
||||
const Style::Gutters& gutters,
|
||||
CompactValue defaultValue);
|
||||
|
||||
// Methods related to positions, margin, padding and border
|
||||
FloatOptional getLeadingPosition(
|
||||
const FlexDirection axis,
|
||||
@@ -231,7 +223,7 @@ class YG_EXPORT Node : public ::YGNode {
|
||||
FloatOptional getMarginForAxis(
|
||||
const FlexDirection axis,
|
||||
const float widthSize) const;
|
||||
float getGapForAxis(const FlexDirection axis, const float widthSize) const;
|
||||
float getGapForAxis(const FlexDirection axis) const;
|
||||
// Setters
|
||||
|
||||
void setContext(void* context) {
|
||||
|
Reference in New Issue
Block a user