Remove min/max macros

...and replace with a local MAX macro, because:

- They contain a ({}) construct which is a GNU extension and that's
  against Drew's coding style
- min() is not used anyway
- MAX() clashes with cairo's macro, so best to not add this in labwc.h
This commit is contained in:
Johan Malm 2021-11-26 19:16:00 +00:00
parent b7c326ec6f
commit bca57213a0
3 changed files with 8 additions and 14 deletions

View file

@ -46,16 +46,6 @@
#define XCURSOR_SIZE 24
#define XCURSOR_MOVE "grabbing"
#define max(a,b) \
({ __typeof__ (a) _a = (a); \
__typeof__ (b) _b = (b); \
_a > _b ? _a : _b; })
#define min(a,b) \
({ __typeof__ (a) _a = (a); \
__typeof__ (b) _b = (b); \
_a < _b ? _a : _b; })
enum input_mode {
LAB_INPUT_STATE_PASSTHROUGH = 0,
LAB_INPUT_STATE_MOVE,