layersurface: dont rollover on size_t (#7451)

unneded rollover on size_t if force equals -1
This commit is contained in:
Tom Englund 2024-08-21 23:05:03 +02:00 committed by GitHub
parent 8162fae377
commit cae937c51b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -433,7 +433,7 @@ void CLayerSurface::startAnimation(bool in, bool instant) {
};
float closest = std::numeric_limits<float>::max();
size_t leader = force;
int leader = force;
if (leader == -1) {
for (size_t i = 0; i < 4; ++i) {
float dist = MIDDLE.distance(edgePoints[i]);