From 87e5a2f512a37b0b4a9f1a5700b0f54424e48f26 Mon Sep 17 00:00:00 2001 From: Jason Felice Date: Sat, 2 Nov 2019 18:36:19 -0400 Subject: [PATCH] Avoid copy constructing BufferCoord when comparing --- src/selection.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/selection.cc b/src/selection.cc index 33b4cd12..a5b2c7b1 100644 --- a/src/selection.cc +++ b/src/selection.cc @@ -45,7 +45,7 @@ void SelectionList::set(Vector list, size_t main) bool compare_selections(const Selection& lhs, const Selection& rhs) { - const auto lmin = lhs.min(), rmin = rhs.min(); + const auto& lmin = lhs.min(), rmin = rhs.min(); return lmin == rmin ? lhs.max() < rhs.max() : lmin < rmin; }