[core] remove std::vector copy step in SymbolLayout::anchorIsTooClose (#16131)

A const reference is enough here.
This commit is contained in:
galinelle
2020-01-22 16:04:31 +02:00
committed by GitHub
parent 04edb1dbaa
commit 4678b3d70c

View File

@@ -682,7 +682,7 @@ bool SymbolLayout::anchorIsTooClose(const std::u16string& text, const float repe
if (compareText.find(text) == compareText.end()) {
compareText.emplace(text, Anchors());
} else {
auto otherAnchors = compareText.find(text)->second;
const auto& otherAnchors = compareText.find(text)->second;
for (const Anchor& otherAnchor : otherAnchors) {
if (util::dist<float>(anchor.point, otherAnchor.point) < repeatDistance) {
return true;