Skip to content

Commit

Permalink
Fix typos.
Browse files Browse the repository at this point in the history
Summary:
This fixes a variety of spelling mistakes in file names, identifiers, and comments.

X-link: facebook/yoga#1629

Reviewed By: NickGerleman

Differential Revision: D54987359

Pulled By: yungsters

fbshipit-source-id: 6b7ca20f4855f5f654036672bc10f8b079288acd
  • Loading branch information
waywardmonkeys authored and facebook-github-bot committed Mar 19, 2024
1 parent ff5e1a6 commit ebd170b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ namespace facebook::yoga::vanillajni {
*
* This class is very explicit in its behavior, and it does not allow to perform
* unexpected conversions or unexpected ownership transfer. In practice, this
* class acts as a unique pointer where the underying JNI reference can have one
* and just one owner. Transferring ownership is allowed but it is an explicit
* operation (implemented via move semantics and also via explicitly API calls).
* class acts as a unique pointer where the underlying JNI reference can have
* one and just one owner. Transferring ownership is allowed but it is an
* explicit operation (implemented via move semantics and also via explicitly
* API calls).
*
* Note that this class doesn't receive an explicit JNIEnv at construction time.
* At destruction time it uses vanillajni::getCurrentEnv() to retrieve the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ namespace facebook::yoga::vanillajni {
*
* This class is very explicit in its behavior, and it does not allow to perform
* unexpected conversions or unexpected ownership transfer. In practice, this
* class acts as a unique pointer where the underying JNI reference can have one
* and just one owner. Transferring ownership is allowed but it is an explicit
* operation (implemented via move semantics and also via explicitly API calls).
* class acts as a unique pointer where the underlying JNI reference can have
* one and just one owner. Transferring ownership is allowed but it is an
* explicit operation (implemented via move semantics and also via explicitly
* API calls).
*
* As with standard JNI local references it is not a valid operation to keep a
* reference around between different native method calls.
Expand Down
8 changes: 4 additions & 4 deletions packages/react-native/ReactCommon/yoga/yoga/YGConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ typedef const struct YGNode* YGNodeConstRef;
typedef struct YGConfig* YGConfigRef;

/**
* Handle to an immutable Yoga configruation.
* Handle to an immutable Yoga configuration.
*/
typedef const struct YGConfig* YGConfigConstRef;

Expand Down Expand Up @@ -60,7 +60,7 @@ YG_EXPORT void YGConfigSetUseWebDefaults(YGConfigRef config, bool enabled);
YG_EXPORT bool YGConfigGetUseWebDefaults(YGConfigConstRef config);

/**
* Yoga will by deafult round final layout positions and dimensions to the
* Yoga will by default round final layout positions and dimensions to the
* nearst point. `pointScaleFactor` controls the density of the grid used for
* layout rounding (e.g. to round to the closest display pixel).
*
Expand All @@ -79,11 +79,11 @@ YG_EXPORT float YGConfigGetPointScaleFactor(YGConfigConstRef config);
* Configures how Yoga balances W3C conformance vs compatibility with layouts
* created against earlier versions of Yoga.
*
* By deafult Yoga will prioritize W3C conformance. `Errata` may be set to ask
* By default Yoga will prioritize W3C conformance. `Errata` may be set to ask
* Yoga to produce specific incorrect behaviors. E.g. `YGConfigSetErrata(config,
* YGErrataStretchFlexBasis)`.
*
* YGErrata is a bitmask, and multiple errata may be set at once. Predfined
* YGErrata is a bitmask, and multiple errata may be set at once. Predefined
* constants exist for convenience:
* 1. YGErrataNone: No errata
* 2. YGErrataClassic: Match layout behaviors of Yoga 1.x
Expand Down
8 changes: 4 additions & 4 deletions packages/react-native/ReactCommon/yoga/yoga/YGNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ YG_EXPORT void YGNodeFreeRecursive(YGNodeRef node);
/**
* Frees the Yoga node without disconnecting it from its owner or children.
* Allows garbage collecting Yoga nodes in parallel when the entire tree is
* unrechable.
* unreachable.
*/
YG_EXPORT void YGNodeFinalize(YGNodeRef node);

Expand Down Expand Up @@ -186,7 +186,7 @@ typedef struct YGSize {
} YGSize;

/**
* Returns the computed dimensions of the node, following the contraints of
* Returns the computed dimensions of the node, following the constraints of
* `widthMode` and `heightMode`:
*
* YGMeasureModeUndefined: The parent has not imposed any constraint on the
Expand All @@ -199,7 +199,7 @@ typedef struct YGSize {
* child. The child is going to be given those bounds regardless of how big it
* wants to be.
*
* @returns the size of the leaf node, measured under the given contraints.
* @returns the size of the leaf node, measured under the given constraints.
*/
typedef YGSize (*YGMeasureFunc)(
YGNodeConstRef node,
Expand All @@ -221,7 +221,7 @@ YG_EXPORT void YGNodeSetMeasureFunc(YGNodeRef node, YGMeasureFunc measureFunc);
YG_EXPORT bool YGNodeHasMeasureFunc(YGNodeConstRef node);

/**
* @returns a defined offet to baseline (ascent).
* @returns a defined offset to baseline (ascent).
*/
typedef float (*YGBaselineFunc)(YGNodeConstRef node, float width, float height);

Expand Down

0 comments on commit ebd170b

Please sign in to comment.