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:
Pritesh Nandgaonkar
2018-01-09 04:21:58 -08:00
committed by Facebook Github Bot
parent 348dd368b5
commit dc6ed89bfa
3 changed files with 8 additions and 6 deletions

View File

@@ -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;