summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/tile.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/tile.cpp b/src/tile.cpp
index 0dfd806..6cdb16d 100644
--- a/src/tile.cpp
+++ b/src/tile.cpp
@@ -532,13 +532,10 @@ TileWindow::constrainMinMax (int width,
max_width = hints->max_width;
max_height = hints->max_height;
}
-#define CLAMPW(v, min, max) ((v) <= (min) ? (min) : (v) >= (max) ? (max) : (v))
/* clamp width and height to min and max values */
- width = CLAMPW (width, min_width, max_width);
- height = CLAMPW (height, min_height, max_height);
-
-#undef CLAMPW
+ width = CLAMP (width, min_width, max_width);
+ height = CLAMP (height, min_height, max_height);
newWidth = width;
newHeight = height;