From 913d32ae210dd9daf180cf2c1c7cb4d6bb7cade1 Mon Sep 17 00:00:00 2001 From: Alexander Golubev Date: Fri, 1 Mar 2019 00:40:30 +0300 Subject: [PATCH] Use std::min/max instead of ancient macros. Signed-off-by: Alexander Golubev --- src/kooldock.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/kooldock.cpp b/src/kooldock.cpp index d81143e..d6d853a 100644 --- a/src/kooldock.cpp +++ b/src/kooldock.cpp @@ -60,10 +60,7 @@ #include #include "setupdialogprg.h" -// macros -#define min(a, b) (a < b) ? (a) : (b) -#define max(a, b) (a > b) ? (a) : (b) - +#include #include //#include #include @@ -1124,10 +1121,10 @@ void KoolDock::mMoveEvent(int ex, int ey) else { iSize[i] = iwSmall; if (cx[i] < mx) { - ii_first = min (i + 1, items.count() - 1); + ii_first = std::min (i + 1, items.count() - 1); } else if (ii_last == (int) items.count() - 1) { - ii_last = max (i - 1, 0); + ii_last = std::max ( (int) i - 1, 0); } } }