mirror of
https://github.com/labwc/labwc.git
synced 2025-10-31 22:25:34 -04:00
common: move MIN and MAX to common/macros.h
This commit is contained in:
parent
5cb1d0e83f
commit
048d22d473
5 changed files with 21 additions and 8 deletions
|
|
@ -32,4 +32,22 @@
|
|||
(dest)->name.notify = handle_##name; \
|
||||
wl_signal_add(&(src)->events.name, &(dest)->name)
|
||||
|
||||
/**
|
||||
* MIN() - Minimum of two values.
|
||||
*
|
||||
* @note Arguments may be evaluated twice.
|
||||
*/
|
||||
#ifndef MIN
|
||||
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
/**
|
||||
* MAX() - Maximum of two values.
|
||||
*
|
||||
* @note Arguments may be evaluated twice.
|
||||
*/
|
||||
#ifndef MAX
|
||||
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
#endif /* LABWC_MACROS_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue