1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-12 09:09:09 +00:00

Cleanup: Simplify CenterBounds()

This commit is contained in:
2022-08-30 08:57:19 +01:00
committed by PeterN
parent ab55d3e1fa
commit 18201dfbc3

View File

@@ -139,7 +139,7 @@ bool FillDrawPixelInfo(DrawPixelInfo *n, int left, int top, int width, int heigh
*/ */
static inline int CenterBounds(int min, int max, int size) static inline int CenterBounds(int min, int max, int size)
{ {
return min + (max - min - size + 1) / 2; return (min + max - size + 1) / 2;
} }
/* window.cpp */ /* window.cpp */