From fcd5fe3c5f3cf8aff9fe8fbb6b5d3fa4b3702dab Mon Sep 17 00:00:00 2001 From: "Evgeniy A. Dushistov" Date: Mon, 10 Oct 2016 01:49:52 +0300 Subject: [PATCH] fix build with clang/libcxx on linux This closes #3807 issue. Because of clang/libcxx 3.8 have overload of `floor` function in math.h for `float` and `double` we got compilation error, but obvious fix: 1.0 -> 1.0f not works, because of at least on Android we have no floor(float) overload. So force usage of floor(double) which exists on every platform. --- drape_frontend/text_layout.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drape_frontend/text_layout.cpp b/drape_frontend/text_layout.cpp index dd758b09df..a72e7f747e 100644 --- a/drape_frontend/text_layout.cpp +++ b/drape_frontend/text_layout.cpp @@ -561,7 +561,7 @@ void PathTextLayout::CalculatePositions(vector & offsets, float splineLen } else { - double const textCount = max(floor(pathLength / minPeriodSize), 1.0); + double const textCount = max(floor(static_cast(pathLength / minPeriodSize)), 1.0); double const glbTextLen = splineLength / textCount; for (double offset = 0.5 * glbTextLen; offset < splineLength; offset += glbTextLen) offsets.push_back(offset);