auto-lint YGLayout.h YGNode.h YGStyle.cpp YGStyle.h

Summary:
@public

automatically applies lint fixes to  YGLayout.h YGNode.h YGStyle.cpp YGStyle.h

Reviewed By: astreet

Differential Revision: D8913432

fbshipit-source-id: 488bf25db041ddb527565c26c1762c6ee4cae736
This commit is contained in:
David Aurelio
2018-07-19 09:51:23 -07:00
committed by Facebook Github Bot
parent 7be9fd1a79
commit f172d5d41c
4 changed files with 40 additions and 39 deletions

View File

@@ -1,10 +1,10 @@
/** /*
* Copyright (c) 2014-present, Facebook, Inc. * Copyright (c) 2014-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
* *
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/ */
#pragma once #pragma once
#include "YGFloatOptional.h" #include "YGFloatOptional.h"
#include "Yoga-internal.h" #include "Yoga-internal.h"

View File

@@ -1,10 +1,10 @@
/** /*
* Copyright (c) 2014-present, Facebook, Inc. * Copyright (c) 2014-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
* *
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/ */
#pragma once #pragma once
#include <stdio.h> #include <stdio.h>
#include "YGConfig.h" #include "YGConfig.h"
@@ -53,23 +53,23 @@ struct YGNode {
bool getHasNewLayout() const { bool getHasNewLayout() const {
return hasNewLayout_; return hasNewLayout_;
} }
YGNodeType getNodeType() const { YGNodeType getNodeType() const {
return nodeType_; return nodeType_;
} }
YGMeasureFunc getMeasure() const { YGMeasureFunc getMeasure() const {
return measure_; return measure_;
} }
YGBaselineFunc getBaseline() const { YGBaselineFunc getBaseline() const {
return baseline_; return baseline_;
} }
YGDirtiedFunc getDirtied() const { YGDirtiedFunc getDirtied() const {
return dirtied_; return dirtied_;
} }
// For Performance reasons passing as reference. // For Performance reasons passing as reference.
YGStyle& getStyle() { YGStyle& getStyle() {
return style_; return style_;
@@ -87,11 +87,11 @@ struct YGNode {
const YGLayout& getLayout() const { const YGLayout& getLayout() const {
return layout_; return layout_;
} }
uint32_t getLineIndex() const { uint32_t getLineIndex() const {
return lineIndex_; return lineIndex_;
} }
// returns the YGNodeRef that owns this YGNode. An owner is used to identify // returns the YGNodeRef that owns this YGNode. An owner is used to identify
// the YogaTree that a YGNode belongs to. // the YogaTree that a YGNode belongs to.
// This method will return the parent of the YGNode when a YGNode only belongs // This method will return the parent of the YGNode when a YGNode only belongs
@@ -100,16 +100,16 @@ struct YGNode {
YGNodeRef getOwner() const { YGNodeRef getOwner() const {
return owner_; return owner_;
} }
// Deprecated, use getOwner() instead. // Deprecated, use getOwner() instead.
YGNodeRef getParent() const { YGNodeRef getParent() const {
return getOwner(); return getOwner();
} }
const YGVector& getChildren() const { const YGVector& getChildren() const {
return children_; return children_;
} }
YGNodeRef getChild(uint32_t index) const { YGNodeRef getChild(uint32_t index) const {
return children_.at(index); return children_.at(index);
} }
@@ -117,21 +117,22 @@ struct YGNode {
YGConfigRef getConfig() const { YGConfigRef getConfig() const {
return config_; return config_;
} }
bool isDirty() const { bool isDirty() const {
return isDirty_; return isDirty_;
} }
std::array<YGValue, 2> getResolvedDimensions() const { std::array<YGValue, 2> getResolvedDimensions() const {
return resolvedDimensions_; return resolvedDimensions_;
} }
YGValue getResolvedDimension(int index) const { YGValue getResolvedDimension(int index) const {
return resolvedDimensions_[index]; return resolvedDimensions_[index];
} }
// Methods related to positions, margin, padding and border // Methods related to positions, margin, padding and border
YGFloatOptional getLeadingPosition(const YGFlexDirection& axis, YGFloatOptional getLeadingPosition(
const YGFlexDirection& axis,
const float& axisSize) const; const float& axisSize) const;
bool isLeadingPositionDefined(const YGFlexDirection& axis) const; bool isLeadingPositionDefined(const YGFlexDirection& axis) const;
bool isTrailingPosDefined(const YGFlexDirection& axis) const; bool isTrailingPosDefined(const YGFlexDirection& axis) const;
@@ -174,7 +175,7 @@ struct YGNode {
void setHasNewLayout(bool hasNewLayout) { void setHasNewLayout(bool hasNewLayout) {
hasNewLayout_ = hasNewLayout; hasNewLayout_ = hasNewLayout;
} }
void setNodeType(YGNodeType nodeType) { void setNodeType(YGNodeType nodeType) {
nodeType_ = nodeType; nodeType_ = nodeType;
} }
@@ -200,15 +201,15 @@ struct YGNode {
void setStyle(const YGStyle& style) { void setStyle(const YGStyle& style) {
style_ = style; style_ = style;
} }
void setLayout(const YGLayout& layout) { void setLayout(const YGLayout& layout) {
layout_ = layout; layout_ = layout;
} }
void setLineIndex(uint32_t lineIndex) { void setLineIndex(uint32_t lineIndex) {
lineIndex_ = lineIndex; lineIndex_ = lineIndex;
} }
void setOwner(YGNodeRef owner) { void setOwner(YGNodeRef owner) {
owner_ = owner; owner_ = owner;
} }
@@ -218,7 +219,7 @@ struct YGNode {
} }
// TODO: rvalue override for setChildren // TODO: rvalue override for setChildren
void setConfig(YGConfigRef config) { void setConfig(YGConfigRef config) {
config_ = config; config_ = config;
} }

View File

@@ -1,10 +1,10 @@
/** /*
* Copyright (c) 2014-present, Facebook, Inc. * Copyright (c) 2014-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
* *
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/ */
#include "YGStyle.h" #include "YGStyle.h"
const YGValue kYGValueUndefined = {0, YGUnitUndefined}; const YGValue kYGValueUndefined = {0, YGUnitUndefined};

View File

@@ -1,10 +1,10 @@
/** /*
* Copyright (c) 2014-present, Facebook, Inc. * Copyright (c) 2014-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
* *
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/ */
#pragma once #pragma once
#include "YGFloatOptional.h" #include "YGFloatOptional.h"
#include "Yoga-internal.h" #include "Yoga-internal.h"