Fix warnings of casting and null pointer handling
Summary: There were warnings of castings and null pointer handling in yoga.cpp. This diff fixes the warnings. The issue was brought up here https://github.com/facebook/react-native/issues/17274 Reviewed By: emilsjolander Differential Revision: D6675111 fbshipit-source-id: 884659fabb05033b4d43d3aa6629e22481d39b7e
This commit is contained in:
committed by
Facebook Github Bot
parent
348dd368b5
commit
dc6ed89bfa
@@ -385,7 +385,7 @@ void YGNode::cloneChildrenIfNeeded() {
|
||||
// YGNodeRemoveChild in yoga.cpp has a forked variant of this algorithm
|
||||
// optimized for deletions.
|
||||
|
||||
const uint32_t childCount = children_.size();
|
||||
const uint32_t childCount = static_cast<uint32_t>(children_.size());
|
||||
if (childCount == 0) {
|
||||
// This is an empty set. Nothing to clone.
|
||||
return;
|
||||
|
Reference in New Issue
Block a user