Skip to content

Drop an always-true unsigned check in YogaLayoutableShadowNode::replaceChild - #60242

Merged
meta-codesync[bot] merged 1 commit into
react:mainfrom
r-barnes:export-D133064050
Nov 23, 2026
Merged

meta-codesync[bot] merged 1 commit into
react:mainfrom
r-barnes:export-D133064050

Conversation

@r-barnes

Copy link
Copy Markdown
Contributor

Summary:
suggestedIndex is a size_t, so suggestedIndex >= 0 is always true. Clang
reports it under -Wtautological-unsigned-zero-compare. The bounds check
suggestedIndex < yogaLayoutableChildren_.size() already rejects every
invalid index, including the "no suggestion" value, so removing it keeps the
same behavior.

Changelog: [Internal]

Differential Revision: D133064050

…ceChild

Summary:
`suggestedIndex` is a `size_t`, so `suggestedIndex >= 0` is always true. Clang
reports it under `-Wtautological-unsigned-zero-compare`. The bounds check
`suggestedIndex < yogaLayoutableChildren_.size()` already rejects every
invalid index, including the "no suggestion" value, so removing it keeps the
same behavior.

Changelog: [Internal]

Differential Revision: D133064050
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 23, 2026
@meta-codesync

meta-codesync Bot commented Nov 23, 2026

Copy link
Copy Markdown

@r-barnes has exported this pull request. If you are a Meta employee, you can view the originating Diff in D133064050.

@meta-codesync
meta-codesync Bot merged commit ad969b2 into react:main Nov 23, 2026
103 checks passed
@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @r-barnes in ad969b2

When will my fix make it into a release? | How to file a pick request?

@react-native-bot react-native-bot added the Merged This PR has been merged. label Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants