Avoid copy constructing BufferCoord when comparing
This commit is contained in:
parent
9692e491ac
commit
87e5a2f512
|
@ -45,7 +45,7 @@ void SelectionList::set(Vector<Selection> list, size_t main)
|
||||||
|
|
||||||
bool compare_selections(const Selection& lhs, const Selection& rhs)
|
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;
|
return lmin == rmin ? lhs.max() < rhs.max() : lmin < rmin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user