Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilation warnings related to YogaShadowNode #38781

Closed
wants to merge 1 commit into from

Commits on Aug 4, 2023

  1. Fix compilation warnings related to YogaShadowNode (facebook#38781)

    Summary:
    Pull Request resolved: facebook#38781
    
    ## Changelog:
    [Internal] -
    
    These pop up when compiling with `/Wall`, fixes two legitimate warnings around using YogaShadowNode/Props in RN.
    
    The `suggestedIndex` in `ShadowNode::replaceChild` (and the overriden one in `YogaLayoutableShadowNode`) is used in a way around the code that suggests that it **is** expected to be negative (checking for non-negativity, assigning -1 as default etc), so having it as a `size_t` type argument both makes things confusing and generates the warning.
    
    I believe it's a good idea to be consistent and use the same type for the index throughout. In majority of the cases it's `int32_t` as of now.
    
    Reviewed By: rozele
    
    Differential Revision: D48059620
    
    fbshipit-source-id: 8550cf78cf4f545081c61e3c88652f9f11cb356f
    rshest authored and facebook-github-bot committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    e7bffd8 View commit details
    Browse the repository at this point in the history