mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-28 02:21:08 +00:00
treewide: replace min/max macros by non-exported MIN/MAX and deprecate them
Replace public min/max macros by private MIN/MAX and deprecate them. The few drivers still using them can trivially define them on their own. Adding a new private header for all kind of math-ish definitions - future commits will move more stuff there. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
ae2cfcdee3
commit
639da9e136
57 changed files with 298 additions and 230 deletions
|
|
@ -37,6 +37,7 @@
|
|||
|
||||
#include "dix/dix_priv.h"
|
||||
#include "os/fmt.h"
|
||||
#include "os/mathx_priv.h"
|
||||
#include "Xext/present/present_priv.h"
|
||||
|
||||
#include "inputstr.h"
|
||||
|
|
@ -59,9 +60,6 @@
|
|||
|
||||
#include "driver.h"
|
||||
|
||||
#define MIN(a,b) ((a) < (b) ? (a) : (b))
|
||||
#define MAX(a,b) ((a) > (b) ? (a) : (b))
|
||||
|
||||
#ifndef GBM_BO_USE_FRONT_RENDERING
|
||||
#define GBM_BO_USE_FRONT_RENDERING 0
|
||||
#endif
|
||||
|
|
@ -3125,12 +3123,12 @@ drmmode_output_add_gtf_modes(xf86OutputPtr output, DisplayModePtr Modes)
|
|||
for (m = Modes; m; m = m->next) {
|
||||
if (m->type & M_T_PREFERRED)
|
||||
preferred = m;
|
||||
max_x = max(max_x, m->HDisplay);
|
||||
max_y = max(max_y, m->VDisplay);
|
||||
max_vrefresh = max(max_vrefresh, xf86ModeVRefresh(m));
|
||||
max_x = MAX(max_x, m->HDisplay);
|
||||
max_y = MAX(max_y, m->VDisplay);
|
||||
max_vrefresh = MAX(max_vrefresh, xf86ModeVRefresh(m));
|
||||
}
|
||||
|
||||
max_vrefresh = max(max_vrefresh, 60.0);
|
||||
max_vrefresh = MAX(max_vrefresh, 60.0);
|
||||
max_vrefresh *= (1 + SYNC_TOLERANCE);
|
||||
|
||||
m = xf86GetDefaultModes();
|
||||
|
|
|
|||
Loading…
Reference in a new issue