From cae937c51bd220d6676c6027d05ea51fc3c821bb Mon Sep 17 00:00:00 2001 From: Tom Englund Date: Wed, 21 Aug 2024 23:05:03 +0200 Subject: layersurface: dont rollover on size_t (#7451) unneded rollover on size_t if force equals -1 --- src/desktop/LayerSurface.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/desktop/LayerSurface.cpp b/src/desktop/LayerSurface.cpp index c352fa74..8fd448ef 100644 --- a/src/desktop/LayerSurface.cpp +++ b/src/desktop/LayerSurface.cpp @@ -432,8 +432,8 @@ void CLayerSurface::startAnimation(bool in, bool instant) { PMONITOR->vecPosition + Vector2D{PMONITOR->vecSize.x, PMONITOR->vecSize.y / 2}, }; - float closest = std::numeric_limits::max(); - size_t leader = force; + float closest = std::numeric_limits::max(); + int leader = force; if (leader == -1) { for (size_t i = 0; i < 4; ++i) { float dist = MIDDLE.distance(edgePoints[i]); -- cgit v1.2.3