Skip to content

Commit f2a2e23

Browse files
committed
Use const Vector & in a predicate
Could help with compiler optimizations and thus performance.
1 parent da2ed88 commit f2a2e23

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/draw.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ void GraphicsWindow::Selection::Draw(bool isHovered, Canvas *canvas) {
6969
Vector topLeft = camera.UnProjectPoint(topLeftScreen);
7070

7171
auto it = std::unique(refs.begin(), refs.end(),
72-
[](Vector a, Vector b) { return a.Equals(b); });
72+
[](const Vector &a, const Vector &b) { return a.Equals(b); });
7373
refs.erase(it, refs.end());
7474
for(const Vector &p : refs) {
7575
canvas->DrawLine(topLeft, p, hcsEmphasis);

0 commit comments

Comments
 (0)