diff --git a/yoga/Utils.h b/yoga/Utils.h index 1de614ce..ce45e348 100644 --- a/yoga/Utils.h +++ b/yoga/Utils.h @@ -40,7 +40,7 @@ struct YGCollectFlexItemsRowValues { float sizeConsumedOnCurrentLine; float totalFlexGrowFactors; float totalFlexShrinkScaledFactors; - float endOfLineIndex; + uint32_t endOfLineIndex; std::vector relativeChildren; float remainingFreeSpace; // The size of the mainDim for the row after considering size, padding, margin diff --git a/yoga/Yoga.cpp b/yoga/Yoga.cpp index af5b2b41..0dba6565 100644 --- a/yoga/Yoga.cpp +++ b/yoga/Yoga.cpp @@ -3368,12 +3368,12 @@ float YGRoundValueToPixelGrid(const float value, const bool forceCeil, const bool forceFloor) { float scaledValue = value * pointScaleFactor; - float fractial = fmodf(scaledValue, 1.0); + float fractial = fmodf(scaledValue, 1.0f); if (YGFloatsEqual(fractial, 0)) { // First we check if the value is already rounded scaledValue = scaledValue - fractial; - } else if (YGFloatsEqual(fractial, 1.0)) { - scaledValue = scaledValue - fractial + 1.0; + } else if (YGFloatsEqual(fractial, 1.0f)) { + scaledValue = scaledValue - fractial + 1.0f; } else if (forceCeil) { // Next we check if we need to use forced rounding scaledValue = scaledValue - fractial + 1.0f;