use fmaxf to prevent casting from and to double

Summary:
Use ```fmaxf``` to prevent double casting.
Closes https://github.com/facebook/css-layout/pull/251

Reviewed By: emilsjolander

Differential Revision: D4199342

Pulled By: splhack

fbshipit-source-id: c04bc68a3c9c97b92e910e885457cf2fe00da28b
This commit is contained in:
Lukas Wöhrl 2016-11-17 20:41:48 -08:00 committed by Facebook Github Bot
parent ee285876d2
commit 687ae48cc7
2 changed files with 2 additions and 2 deletions

View File

@ -1812,7 +1812,7 @@ static void layoutNodeImpl(const CSSNodeRef node,
if (measureModeMainDim == CSSMeasureModeAtMost && remainingFreeSpace > 0) {
if (!CSSValueIsUndefined(node->style.minDimensions[dim[mainAxis]]) &&
node->style.minDimensions[dim[mainAxis]] >= 0) {
remainingFreeSpace = fmax(0,
remainingFreeSpace = fmaxf(0,
node->style.minDimensions[dim[mainAxis]] -
(availableInnerMainDim - remainingFreeSpace));
} else {

View File

@ -1812,7 +1812,7 @@ static void layoutNodeImpl(const CSSNodeRef node,
if (measureModeMainDim == CSSMeasureModeAtMost && remainingFreeSpace > 0) {
if (!CSSValueIsUndefined(node->style.minDimensions[dim[mainAxis]]) &&
node->style.minDimensions[dim[mainAxis]] >= 0) {
remainingFreeSpace = fmax(0,
remainingFreeSpace = fmaxf(0,
node->style.minDimensions[dim[mainAxis]] -
(availableInnerMainDim - remainingFreeSpace));
} else {