Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix warnings around mixing int and size_t usage in unsafe ways (faceb…
…ook#34889) Summary: react-native-windows builds treat a lot of c++ compiler warnings as errors. Including ones that cause value truncation when assigning `size_t` values to an `int`. This fixes the compiler warning, by using `size_t` as the type for `i`, which matches `size`. I then modified the loop to avoid the value underflow that occurs when decrementing an unsigned zero value. ## Changelog [Internal] [Changed] - Fix compiler warnings around mixing int and size_t usage in unsafe ways Pull Request resolved: facebook#34889 Test Plan: This code change was made in react-native-windows when integrating latest react-native changes. -- our fabric implementation was able to run through this code without any issues. Reviewed By: mdvacca Differential Revision: D40158306 Pulled By: rozele fbshipit-source-id: b6858cb953635b37fd63a88ed1a372eb3dc394f7
- Loading branch information