diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-12-14 14:57:00 -0800 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-12-20 08:30:39 -0800 |
commit | 3dcff6c3e11caa454893f44a300a3be0120325a3 (patch) | |
tree | 0af0743911663986f50ee0236c785d2395ad3f94 /src/mbgl/layout/symbol_layout.cpp | |
parent | 3032a67a53c02ab3b4281656456e6d62372c080f (diff) | |
download | qtlocation-mapboxgl-3dcff6c3e11caa454893f44a300a3be0120325a3.tar.gz |
[core] const correctness
Diffstat (limited to 'src/mbgl/layout/symbol_layout.cpp')
-rw-r--r-- | src/mbgl/layout/symbol_layout.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mbgl/layout/symbol_layout.cpp b/src/mbgl/layout/symbol_layout.cpp index 7dad5c9429..2b7b41b8c9 100644 --- a/src/mbgl/layout/symbol_layout.cpp +++ b/src/mbgl/layout/symbol_layout.cpp @@ -311,12 +311,12 @@ void SymbolLayout::addFeature(const GeometryCollection &lines, } } -bool SymbolLayout::anchorIsTooClose(const std::u16string &text, const float repeatDistance, Anchor &anchor) { +bool SymbolLayout::anchorIsTooClose(const std::u16string& text, const float repeatDistance, const Anchor& anchor) { if (compareText.find(text) == compareText.end()) { compareText.emplace(text, Anchors()); } else { auto otherAnchors = compareText.find(text)->second; - for (Anchor &otherAnchor : otherAnchors) { + for (const Anchor& otherAnchor : otherAnchors) { if (util::dist<float>(anchor.point, otherAnchor.point) < repeatDistance) { return true; } |