Skip to content
Snippets Groups Projects
Commit 01ee0f7e authored by Peter Hutterer's avatar Peter Hutterer
Browse files

util: add min/max macros


Signed-off-by: default avatarPeter Hutterer <peter.hutterer@who-t.net>
parent b34139c9
No related branches found
No related tags found
No related merge requests found
......@@ -73,6 +73,9 @@ int list_empty(const struct list *list);
#define ARRAY_FOR_EACH(_arr, _elem) \
for (int i = 0; (_elem = &_arr[i]) && i < ARRAY_LENGTH(_arr); i++)
#define min(a, b) (((a) < (b)) ? (a) : (b))
#define max(a, b) (((a) > (b)) ? (a) : (b))
/*
* This fixed point implementation is a verbatim copy from wayland-util.h from
* the Wayland project, with the wl_ prefix renamed li_.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment