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

@@ -212,7 +212,7 @@ void YGNodeToString(
}
appendFormatedString(str, ">");
const uint32_t childCount = node->getChildren().size();
const uint32_t childCount = static_cast<uint32_t>(node->getChildren().size());
if (options & YGPrintOptionsChildren && childCount > 0) {
for (uint32_t i = 0; i < childCount; i++) {
appendFormatedString(str, "\n");