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:
parent
ee285876d2
commit
687ae48cc7
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue