Avoid copy constructing BufferCoord when comparing

This commit is contained in:
Jason Felice 2019-11-02 18:36:19 -04:00
parent 9692e491ac
commit 87e5a2f512

View File

@ -45,7 +45,7 @@ void SelectionList::set(Vector<Selection> 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;
}