Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeniy A. Dushistov <dushistov@mail.ru>2016-10-10 01:49:52 +0300
committerEvgeniy A. Dushistov <dushistov@mail.ru>2016-10-10 01:49:52 +0300
commitfcd5fe3c5f3cf8aff9fe8fbb6b5d3fa4b3702dab (patch)
tree57ee206ddfc45180128b63897fde2e75ad185116 /drape_frontend
parent75b38035b7aca2cad9aa9498b70d09972bbebc7e (diff)
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.
Diffstat (limited to 'drape_frontend')
-rw-r--r--drape_frontend/text_layout.cpp2
1 files changed, 1 insertions, 1 deletions
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<float> & offsets, float splineLen
}
else
{
- double const textCount = max(floor(pathLength / minPeriodSize), 1.0);
+ double const textCount = max(floor(static_cast<double>(pathLength / minPeriodSize)), 1.0);
double const glbTextLen = splineLength / textCount;
for (double offset = 0.5 * glbTextLen; offset < splineLength; offset += glbTextLen)
offsets.push_back(offset);