summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlexander Golubev <fatzer2@gmail.com>2019-03-01 00:40:30 +0300
committerSlávek Banko <slavek.banko@axis.cz>2019-03-02 11:41:03 +0100
commit913d32ae210dd9daf180cf2c1c7cb4d6bb7cade1 (patch)
treeae12516028f0cedea5748403d59c1f62496be8b0 /src
parentf9440f0f509ffa5046a0c48f97d1f847577e06df (diff)
downloadkooldock-913d32ae210dd9daf180cf2c1c7cb4d6bb7cade1.tar.gz
kooldock-913d32ae210dd9daf180cf2c1c7cb4d6bb7cade1.zip
Use std::min/max instead of ancient macros.
Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/kooldock.cpp9
1 files 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 <kdebug.h>
#include "setupdialogprg.h"
-// macros
-#define min(a, b) (a < b) ? (a) : (b)
-#define max(a, b) (a > b) ? (a) : (b)
-
+#include <algorithm>
#include <dcopclient.h>
//#include <iostream>
#include <tqdatastream.h>
@@ -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);
}
}
}