don't use certain STL functions

some functions defined in <cmath>, as well as std::to_string aren't available on GNU's STL for some platforms, e.g. Android
This commit is contained in:
Konstantin Käfer
2015-08-03 15:01:35 +02:00
parent ab7456075c
commit 78ec33320f
34 changed files with 69 additions and 51 deletions

View File

@@ -13,8 +13,8 @@ size_t TextVertexBuffer::add(int16_t x, int16_t y, float ox, float oy, uint16_t
int16_t *shorts = static_cast<int16_t *>(data);
shorts[0] /* pos */ = x;
shorts[1] /* pos */ = y;
shorts[2] /* offset */ = std::round(ox * 64); // use 1/64 pixels for placement
shorts[3] /* offset */ = std::round(oy * 64);
shorts[2] /* offset */ = ::round(ox * 64); // use 1/64 pixels for placement
shorts[3] /* offset */ = ::round(oy * 64);
uint8_t *ubytes = static_cast<uint8_t *>(data);
// a_data1
@@ -24,7 +24,7 @@ size_t TextVertexBuffer::add(int16_t x, int16_t y, float ox, float oy, uint16_t
// a_data2
ubytes[12] /* minzoom */ = minzoom * 10; // 1/10 zoom levels: z16 == 160.
ubytes[13] /* maxzoom */ = std::fmin(maxzoom, 25) * 10; // 1/10 zoom levels: z16 == 160.
ubytes[13] /* maxzoom */ = ::fmin(maxzoom, 25) * 10; // 1/10 zoom levels: z16 == 160.
return idx;
}