diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2014-05-14 16:40:24 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2014-05-14 16:40:24 +0200 |
commit | b167a79c22ed3e65941305a7d8e0fedb796dd11f (patch) | |
tree | d18abbec96b0b12eb26d809b5b9abdc7b305c37c /src/geometry/text_buffer.cpp | |
parent | b8d88600b81372a7544ebe420c562c4fa02592e9 (diff) | |
download | qtlocation-mapboxgl-b167a79c22ed3e65941305a7d8e0fedb796dd11f.tar.gz |
always use std:: namespace for math functions
fixes #201
Diffstat (limited to 'src/geometry/text_buffer.cpp')
-rw-r--r-- | src/geometry/text_buffer.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/geometry/text_buffer.cpp b/src/geometry/text_buffer.cpp index d8b2eb6ef2..d3529c5604 100644 --- a/src/geometry/text_buffer.cpp +++ b/src/geometry/text_buffer.cpp @@ -15,21 +15,21 @@ 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] = x; shorts[1] = y; - shorts[2] = round(ox * 64); // use 1/64 pixels for placement - shorts[3] = round(oy * 64); + shorts[2] = std::round(ox * 64); // use 1/64 pixels for placement + shorts[3] = std::round(oy * 64); uint8_t *ubytes = static_cast<uint8_t *>(data); // a_data1 ubytes[8] = tx / 4; ubytes[9] = ty / 4; ubytes[10] = labelminzoom * 10; - ubytes[11] = (int16_t)round(angle * angleFactor) % 256; + ubytes[11] = (int16_t)std::round(angle * angleFactor) % 256; // a_data2 ubytes[12] = minzoom * 10; // 1/10 zoom levels: z16 == 160. - ubytes[13] = fmin(maxzoom, 25) * 10; // 1/10 zoom levels: z16 == 160. - ubytes[14] = util::max((int16_t)round(range[0] * angleFactor), (int16_t)0) % 256; - ubytes[15] = util::min((int16_t)round(range[1] * angleFactor), (int16_t)255) % 256; + ubytes[13] = std::fmin(maxzoom, 25) * 10; // 1/10 zoom levels: z16 == 160. + ubytes[14] = util::max((int16_t)std::round(range[0] * angleFactor), (int16_t)0) % 256; + ubytes[15] = util::min((int16_t)std::round(range[1] * angleFactor), (int16_t)255) % 256; return idx; } |