Automatic lint fixes

Summary:
@public
A round of automatic lint fixes.

Reviewed By: SidharthGuglani

Differential Revision: D14590396

fbshipit-source-id: f0b4a0ce503a1d9d46ea7ae788f9f2eac09c2ac7
This commit is contained in:
David Aurelio
2019-03-25 05:37:36 -07:00
committed by Facebook Github Bot
parent 7d7b7b9e18
commit 85352c4e45
66 changed files with 833 additions and 917 deletions

View File

@@ -1,10 +1,9 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* 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
#include <memory>
@@ -20,188 +19,176 @@
class Node {
public:
public:
static Node* createDefault(void);
static Node* createWithConfig(Config* config);
static Node * createDefault(void);
static Node * createWithConfig(Config * config);
static void destroy(Node* node);
static void destroy(Node * node);
public:
static Node* fromYGNode(YGNodeRef nodeRef);
public:
private:
Node(Config* config);
static Node * fromYGNode(YGNodeRef nodeRef);
public:
~Node(void);
private:
public: // Prevent accidental copy
Node(Node const&) = delete;
Node(Config * config);
Node const& operator=(Node const&) = delete;
public:
public:
void reset(void);
~Node(void);
public: // Style setters
void copyStyle(Node const& other);
public: // Prevent accidental copy
void setPositionType(int positionType);
void setPosition(int edge, double position);
void setPositionPercent(int edge, double position);
Node(Node const &) = delete;
void setAlignContent(int alignContent);
void setAlignItems(int alignItems);
void setAlignSelf(int alignSelf);
void setFlexDirection(int flexDirection);
void setFlexWrap(int flexWrap);
void setJustifyContent(int justifyContent);
Node const & operator=(Node const &) = delete;
void setMargin(int edge, double margin);
void setMarginPercent(int edge, double margin);
void setMarginAuto(int edge);
public:
void setOverflow(int overflow);
void setDisplay(int display);
void reset(void);
void setFlex(double flex);
void setFlexBasis(double flexBasis);
void setFlexBasisPercent(double flexBasis);
void setFlexBasisAuto();
void setFlexGrow(double flexGrow);
void setFlexShrink(double flexShrink);
public: // Style setters
void setWidth(double width);
void setWidthPercent(double width);
void setWidthAuto();
void setHeight(double height);
void setHeightPercent(double height);
void setHeightAuto();
void copyStyle(Node const & other);
void setMinWidth(double minWidth);
void setMinWidthPercent(double minWidth);
void setMinHeight(double minHeight);
void setMinHeightPercent(double minHeight);
void setPositionType(int positionType);
void setPosition(int edge, double position);
void setPositionPercent(int edge, double position);
void setMaxWidth(double maxWidth);
void setMaxWidthPercent(double maxWidth);
void setMaxHeight(double maxHeight);
void setMaxHeightPercent(double maxHeight);
void setAlignContent(int alignContent);
void setAlignItems(int alignItems);
void setAlignSelf(int alignSelf);
void setFlexDirection(int flexDirection);
void setFlexWrap(int flexWrap);
void setJustifyContent(int justifyContent);
void setAspectRatio(double aspectRatio);
void setMargin(int edge, double margin);
void setMarginPercent(int edge, double margin);
void setMarginAuto(int edge);
void setBorder(int edge, double border);
void setOverflow(int overflow);
void setDisplay(int display);
void setPadding(int edge, double padding);
void setPaddingPercent(int edge, double padding);
void setFlex(double flex);
void setFlexBasis(double flexBasis);
void setFlexBasisPercent(double flexBasis);
void setFlexBasisAuto();
void setFlexGrow(double flexGrow);
void setFlexShrink(double flexShrink);
public: // Style getters
int getPositionType(void) const;
Value getPosition(int edge) const;
void setWidth(double width);
void setWidthPercent(double width);
void setWidthAuto();
void setHeight(double height);
void setHeightPercent(double height);
void setHeightAuto();
int getAlignContent(void) const;
int getAlignItems(void) const;
int getAlignSelf(void) const;
int getFlexDirection(void) const;
int getFlexWrap(void) const;
int getJustifyContent(void) const;
void setMinWidth(double minWidth);
void setMinWidthPercent(double minWidth);
void setMinHeight(double minHeight);
void setMinHeightPercent(double minHeight);
Value getMargin(int edge) const;
void setMaxWidth(double maxWidth);
void setMaxWidthPercent(double maxWidth);
void setMaxHeight(double maxHeight);
void setMaxHeightPercent(double maxHeight);
int getOverflow(void) const;
int getDisplay(void) const;
void setAspectRatio(double aspectRatio);
Value getFlexBasis(void) const;
double getFlexGrow(void) const;
double getFlexShrink(void) const;
void setBorder(int edge, double border);
Value getWidth(void) const;
Value getHeight(void) const;
void setPadding(int edge, double padding);
void setPaddingPercent(int edge, double padding);
Value getMinWidth(void) const;
Value getMinHeight(void) const;
public: // Style getters
Value getMaxWidth(void) const;
Value getMaxHeight(void) const;
int getPositionType(void) const;
Value getPosition(int edge) const;
double getAspectRatio(void) const;
int getAlignContent(void) const;
int getAlignItems(void) const;
int getAlignSelf(void) const;
int getFlexDirection(void) const;
int getFlexWrap(void) const;
int getJustifyContent(void) const;
double getBorder(int edge) const;
Value getMargin(int edge) const;
Value getPadding(int edge) const;
int getOverflow(void) const;
int getDisplay(void) const;
public: // Tree hierarchy mutators
void insertChild(Node* child, unsigned index);
void removeChild(Node* child);
Value getFlexBasis(void) const;
double getFlexGrow(void) const;
double getFlexShrink(void) const;
public: // Tree hierarchy inspectors
unsigned getChildCount(void) const;
Value getWidth(void) const;
Value getHeight(void) const;
// The following functions cannot be const because they could discard const
// qualifiers (ex: constNode->getChild(0)->getParent() wouldn't be const)
Value getMinWidth(void) const;
Value getMinHeight(void) const;
Node* getParent(void);
Node* getChild(unsigned index);
Value getMaxWidth(void) const;
Value getMaxHeight(void) const;
public: // Measure func mutators
void setMeasureFunc(nbind::cbFunction& measureFunc);
void unsetMeasureFunc(void);
double getAspectRatio(void) const;
public: // Measure func inspectors
Size callMeasureFunc(
double width,
int widthMode,
double height,
int heightMode) const;
double getBorder(int edge) const;
public: // Dirtied func mutators
void setDirtiedFunc(nbind::cbFunction& dirtiedFunc);
void unsetDirtiedFunc(void);
Value getPadding(int edge) const;
public: // Dirtied func inspectors
void callDirtiedFunc(void) const;
public: // Tree hierarchy mutators
public: // Dirtiness accessors
void markDirty(void);
bool isDirty(void) const;
void insertChild(Node * child, unsigned index);
void removeChild(Node * child);
public: // Layout mutators
void calculateLayout(double width, double height, int direction);
public: // Tree hierarchy inspectors
public: // Layout inspectors
double getComputedLeft(void) const;
double getComputedRight(void) const;
unsigned getChildCount(void) const;
double getComputedTop(void) const;
double getComputedBottom(void) const;
// The following functions cannot be const because they could discard const qualifiers (ex: constNode->getChild(0)->getParent() wouldn't be const)
double getComputedWidth(void) const;
double getComputedHeight(void) const;
Node * getParent(void);
Node * getChild(unsigned index);
Layout getComputedLayout(void) const;
public: // Measure func mutators
double getComputedMargin(int edge) const;
double getComputedBorder(int edge) const;
double getComputedPadding(int edge) const;
void setMeasureFunc(nbind::cbFunction & measureFunc);
void unsetMeasureFunc(void);
public:
void setIsReferenceBaseline(bool isReferenceBaseline);
bool isReferenceBaseline();
public: // Measure func inspectors
YGNodeRef m_node;
Size callMeasureFunc(double width, int widthMode, double height, int heightMode) const;
public: // Dirtied func mutators
void setDirtiedFunc(nbind::cbFunction & dirtiedFunc);
void unsetDirtiedFunc(void);
public: // Dirtied func inspectors
void callDirtiedFunc(void) const;
public: // Dirtiness accessors
void markDirty(void);
bool isDirty(void) const;
public: // Layout mutators
void calculateLayout(double width, double height, int direction);
public: // Layout inspectors
double getComputedLeft(void) const;
double getComputedRight(void) const;
double getComputedTop(void) const;
double getComputedBottom(void) const;
double getComputedWidth(void) const;
double getComputedHeight(void) const;
Layout getComputedLayout(void) const;
double getComputedMargin(int edge) const;
double getComputedBorder(int edge) const;
double getComputedPadding(int edge) const;
public:
void setIsReferenceBaseline(bool isReferenceBaseline);
bool isReferenceBaseline();
YGNodeRef m_node;
std::unique_ptr<nbind::cbFunction> m_measureFunc;
std::unique_ptr<nbind::cbFunction> m_dirtiedFunc;
std::unique_ptr<nbind::cbFunction> m_measureFunc;
std::unique_ptr<nbind::cbFunction> m_dirtiedFunc;
};