diff --git a/yoga/Yoga.c b/yoga/Yoga.c index 5410895e..15ac4586 100644 --- a/yoga/Yoga.c +++ b/yoga/Yoga.c @@ -3171,12 +3171,12 @@ float YGRoundValueToPixelGrid(const float value, scaledValue = scaledValue - fractial + 1.0; } else if (forceCeil) { // Next we check if we need to use forced rounding - scaledValue = scaledValue - fractial + 1.0; + scaledValue = scaledValue - fractial + 1.0f; } else if (forceFloor) { scaledValue = scaledValue - fractial; } else { // Finally we just round the value - scaledValue = scaledValue - fractial + (fractial >= 0.5f ? 1.0 : 0); + scaledValue = scaledValue - fractial + (fractial >= 0.5f ? 1.0f : 0.0f); } return scaledValue / pointScaleFactor; } diff --git a/yoga/Yoga.h b/yoga/Yoga.h index c3d3260d..81bbe7b3 100644 --- a/yoga/Yoga.h +++ b/yoga/Yoga.h @@ -112,7 +112,7 @@ WIN_EXPORT bool YGNodeCanUseCachedMeasurement(const YGMeasureMode widthMode, const float lastComputedHeight, const float marginRow, const float marginColumn, - YGConfigRef config); + const YGConfigRef config); WIN_EXPORT void YGNodeCopyStyle(const YGNodeRef dstNode, const YGNodeRef srcNode);