summaryrefslogtreecommitdiff
path: root/src/mbgl/text/get_anchors.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/text/get_anchors.cpp')
-rw-r--r--src/mbgl/text/get_anchors.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mbgl/text/get_anchors.cpp b/src/mbgl/text/get_anchors.cpp
index 714bc79fea..c8f5f470b4 100644
--- a/src/mbgl/text/get_anchors.cpp
+++ b/src/mbgl/text/get_anchors.cpp
@@ -61,7 +61,7 @@ static Anchors resample(const GeometryCoordinates& line,
if (x >= 0 && x < util::EXTENT && y >= 0 && y < util::EXTENT &&
markedDistance - halfLabelLength >= 0.0f &&
markedDistance + halfLabelLength <= lineLength) {
- Anchor anchor(::round(x), ::round(y), angle, i);
+ Anchor anchor(std::round(x), std::round(y), angle, i);
if (!angleWindowSize || checkMaxAngle(line, anchor, labelLength, angleWindowSize, maxAngle)) {
anchors.push_back(anchor);
@@ -104,7 +104,7 @@ Anchors getAnchors(const GeometryCoordinates& line,
const float angleWindowSize = getAngleWindowSize(textLeft, textRight, glyphSize, boxScale);
- const float shapedLabelLength = fmax(textRight - textLeft, iconRight - iconLeft);
+ const float shapedLabelLength = std::fmax(textRight - textLeft, iconRight - iconLeft);
const float labelLength = shapedLabelLength * boxScale;
// Is the line continued from outside the tile boundary?
@@ -143,8 +143,8 @@ optional<Anchor> getCenterAnchor(const GeometryCoordinates& line,
}
const float angleWindowSize = getAngleWindowSize(textLeft, textRight, glyphSize, boxScale);
- const float labelLength = fmax(textRight - textLeft, iconRight - iconLeft) * boxScale;
-
+ const float labelLength = std::fmax(textRight - textLeft, iconRight - iconLeft) * boxScale;
+
float prevDistance = 0;
const float centerDistance = getLineLength(line) / 2;
@@ -161,7 +161,7 @@ optional<Anchor> getCenterAnchor(const GeometryCoordinates& line,
x = util::interpolate(float(a.x), float(b.x), t),
y = util::interpolate(float(a.y), float(b.y), t);
- Anchor anchor(::round(x), ::round(y), util::angle_to(b, a), i);
+ Anchor anchor(std::round(x), std::round(y), util::angle_to(b, a), i);
if (!angleWindowSize || checkMaxAngle(line, anchor, labelLength, angleWindowSize, maxAngle)) {
return anchor;