diff options
| author | Tom Englund <tomenglund26@gmail.com> | 2024-08-21 23:05:03 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-21 22:05:03 +0100 |
| commit | cae937c51bd220d6676c6027d05ea51fc3c821bb (patch) | |
| tree | fecab879278c4c5ec914cac1865efab8188f5c8d /src/desktop/LayerSurface.cpp | |
| parent | 8162fae37728b3ae2b1a82a32663e76c59c4ce61 (diff) | |
layersurface: dont rollover on size_t (#7451)
unneded rollover on size_t if force equals -1
Diffstat (limited to 'src/desktop/LayerSurface.cpp')
| -rw-r--r-- | src/desktop/LayerSurface.cpp | 4 |
1 files 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<float>::max(); - size_t leader = force; + float closest = std::numeric_limits<float>::max(); + int leader = force; if (leader == -1) { for (size_t i = 0; i < 4; ++i) { float dist = MIDDLE.distance(edgePoints[i]); |
