Viewport: Fix scroll region sort comparison not meeting strict weak ordering
See: #137
This commit is contained in:
@@ -553,11 +553,11 @@ static void DoSetViewportPosition(Window *w, const int left, const int top, cons
|
|||||||
if (_networking) NetworkUndrawChatMessage();
|
if (_networking) NetworkUndrawChatMessage();
|
||||||
|
|
||||||
std::sort(_vp_redraw_regions.begin(), _vp_redraw_regions.end(), [&](const ViewportRedrawRegion &a, const ViewportRedrawRegion &b) {
|
std::sort(_vp_redraw_regions.begin(), _vp_redraw_regions.end(), [&](const ViewportRedrawRegion &a, const ViewportRedrawRegion &b) {
|
||||||
if (a.coords.right <= b.coords.left) return xo > 0;
|
if (a.coords.right <= b.coords.left && xo > 0) return true;
|
||||||
if (a.coords.left >= b.coords.right) return xo < 0;
|
if (a.coords.left >= b.coords.right && xo < 0) return true;
|
||||||
if (a.coords.bottom <= b.coords.top) return yo > 0;
|
if (a.coords.bottom <= b.coords.top && yo > 0) return true;
|
||||||
if (a.coords.top >= b.coords.bottom) return yo < 0;
|
if (a.coords.top >= b.coords.bottom && yo < 0) return true;
|
||||||
NOT_REACHED();
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
while (!_vp_redraw_regions.empty()) {
|
while (!_vp_redraw_regions.empty()) {
|
||||||
|
Reference in New Issue
Block a user