diff options
Diffstat (limited to 'src/Compositor.cpp')
| -rw-r--r-- | src/Compositor.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index de80d797..f670a643 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -1102,7 +1102,7 @@ CWindow* CCompositor::getWindowInDirection(CWindow* pWindow, char dir) { switch (dir) { case 'l': if (STICKS(POSA.x, POSB.x + SIZEB.x)) { - const auto INTERSECTLEN = std::max((double)0, std::min(POSA.y + SIZEA.y, POSB.y + SIZEB.y) - std::max(POSA.y, POSB.y)); + const auto INTERSECTLEN = std::max(0.0, std::min(POSA.y + SIZEA.y, POSB.y + SIZEB.y) - std::max(POSA.y, POSB.y)); if (INTERSECTLEN > longestIntersect) { longestIntersect = INTERSECTLEN; longestIntersectWindow = w.get(); @@ -1111,7 +1111,7 @@ CWindow* CCompositor::getWindowInDirection(CWindow* pWindow, char dir) { break; case 'r': if (STICKS(POSA.x + SIZEA.x, POSB.x)) { - const auto INTERSECTLEN = std::max((double)0, std::min(POSA.y + SIZEA.y, POSB.y + SIZEB.y) - std::max(POSA.y, POSB.y)); + const auto INTERSECTLEN = std::max(0.0, std::min(POSA.y + SIZEA.y, POSB.y + SIZEB.y) - std::max(POSA.y, POSB.y)); if (INTERSECTLEN > longestIntersect) { longestIntersect = INTERSECTLEN; longestIntersectWindow = w.get(); @@ -1121,7 +1121,7 @@ CWindow* CCompositor::getWindowInDirection(CWindow* pWindow, char dir) { case 't': case 'u': if (STICKS(POSA.y, POSB.y + SIZEB.y)) { - const auto INTERSECTLEN = std::max((double)0, std::min(POSA.x + SIZEA.x, POSB.x + SIZEB.x) - std::max(POSA.x, POSB.x)); + const auto INTERSECTLEN = std::max(0.0, std::min(POSA.x + SIZEA.x, POSB.x + SIZEB.x) - std::max(POSA.x, POSB.x)); if (INTERSECTLEN > longestIntersect) { longestIntersect = INTERSECTLEN; longestIntersectWindow = w.get(); @@ -1131,7 +1131,7 @@ CWindow* CCompositor::getWindowInDirection(CWindow* pWindow, char dir) { case 'b': case 'd': if (STICKS(POSA.y + SIZEA.y, POSB.y)) { - const auto INTERSECTLEN = std::max((double)0, std::min(POSA.x + SIZEA.x, POSB.x + SIZEB.x) - std::max(POSA.x, POSB.x)); + const auto INTERSECTLEN = std::max(0.0, std::min(POSA.x + SIZEA.x, POSB.x + SIZEB.x) - std::max(POSA.x, POSB.x)); if (INTERSECTLEN > longestIntersect) { longestIntersect = INTERSECTLEN; longestIntersectWindow = w.get(); @@ -1277,7 +1277,7 @@ CMonitor* CCompositor::getMonitorInDirection(const char& dir) { switch (dir) { case 'l': if (STICKS(POSA.x, POSB.x + SIZEB.x)) { - const auto INTERSECTLEN = std::max((double)0, std::min(POSA.y + SIZEA.y, POSB.y + SIZEB.y) - std::max(POSA.y, POSB.y)); + const auto INTERSECTLEN = std::max(0.0, std::min(POSA.y + SIZEA.y, POSB.y + SIZEB.y) - std::max(POSA.y, POSB.y)); if (INTERSECTLEN > longestIntersect) { longestIntersect = INTERSECTLEN; longestIntersectMonitor = m.get(); @@ -1286,7 +1286,7 @@ CMonitor* CCompositor::getMonitorInDirection(const char& dir) { break; case 'r': if (STICKS(POSA.x + SIZEA.x, POSB.x)) { - const auto INTERSECTLEN = std::max((double)0, std::min(POSA.y + SIZEA.y, POSB.y + SIZEB.y) - std::max(POSA.y, POSB.y)); + const auto INTERSECTLEN = std::max(0.0, std::min(POSA.y + SIZEA.y, POSB.y + SIZEB.y) - std::max(POSA.y, POSB.y)); if (INTERSECTLEN > longestIntersect) { longestIntersect = INTERSECTLEN; longestIntersectMonitor = m.get(); @@ -1296,7 +1296,7 @@ CMonitor* CCompositor::getMonitorInDirection(const char& dir) { case 't': case 'u': if (STICKS(POSA.y, POSB.y + SIZEB.y)) { - const auto INTERSECTLEN = std::max((double)0, std::min(POSA.x + SIZEA.x, POSB.x + SIZEB.x) - std::max(POSA.x, POSB.x)); + const auto INTERSECTLEN = std::max(0.0, std::min(POSA.x + SIZEA.x, POSB.x + SIZEB.x) - std::max(POSA.x, POSB.x)); if (INTERSECTLEN > longestIntersect) { longestIntersect = INTERSECTLEN; longestIntersectMonitor = m.get(); @@ -1306,7 +1306,7 @@ CMonitor* CCompositor::getMonitorInDirection(const char& dir) { case 'b': case 'd': if (STICKS(POSA.y + SIZEA.y, POSB.y)) { - const auto INTERSECTLEN = std::max((double)0, std::min(POSA.x + SIZEA.x, POSB.x + SIZEB.x) - std::max(POSA.x, POSB.x)); + const auto INTERSECTLEN = std::max(0.0, std::min(POSA.x + SIZEA.x, POSB.x + SIZEB.x) - std::max(POSA.x, POSB.x)); if (INTERSECTLEN > longestIntersect) { longestIntersect = INTERSECTLEN; longestIntersectMonitor = m.get(); |
