[core] Fix build with Qt + Android + GCC 4.9

Android uses and old libc when building
with GCC 4.9 and some math functions are not
on std::.
This commit is contained in:
Thiago Marcos P. Santos
2018-02-25 11:10:53 +02:00
committed by Bruno de Oliveira Abinader
parent c1b17e251a
commit 17334c74a0

View File

@@ -95,7 +95,7 @@ AlphaImage transformRasterToSDF(const AlphaImage& rasterInput, double radius, do
for (uint32_t i = 0; i < size; i++) {
double distance = gridOuter[i] - gridInner[i];
sdf.data[i] = std::max(0l, std::min(255l, std::lround(255.0 - 255.0 * (distance / radius + cutoff))));
sdf.data[i] = std::max(0l, std::min(255l, ::lround(255.0 - 255.0 * (distance / radius + cutoff))));
}
return sdf;