all: fix new lints

This commit is contained in:
outfoxxed 2025-01-07 03:11:19 -08:00
parent 26d443aa50
commit 2c411fce5a
No known key found for this signature in database
GPG key ID: 4C88A185FB89301E
43 changed files with 351 additions and 316 deletions

View file

@ -1,4 +1,5 @@
#include "popupanchor.hpp"
#include <algorithm>
#include <qcontainerfwd.h>
#include <qlogging.h>
@ -276,9 +277,7 @@ void PopupPositioner::reposition(PopupAnchor* anchor, QWindow* window, bool only
effectiveX = screenGeometry.right() - windowGeometry.width() + 1;
}
if (effectiveX < screenGeometry.left()) {
effectiveX = screenGeometry.left();
}
effectiveX = std::max(effectiveX, screenGeometry.left());
}
if (adjustment.testFlag(PopupAdjustment::SlideY)) {
@ -286,9 +285,7 @@ void PopupPositioner::reposition(PopupAnchor* anchor, QWindow* window, bool only
effectiveY = screenGeometry.bottom() - windowGeometry.height() + 1;
}
if (effectiveY < screenGeometry.top()) {
effectiveY = screenGeometry.top();
}
effectiveY = std::max(effectiveY, screenGeometry.top());
}
if (adjustment.testFlag(PopupAdjustment::ResizeX)) {