mirror of
https://gitee.com/openharmony/third_party_libsnd
synced 2025-02-17 09:29:53 +00:00
src/common.h : Fix SF_MAX and SF_MIN so they can be nested.
This commit is contained in:
parent
43a69d5143
commit
26438fe108
16
src/common.h
16
src/common.h
@ -89,16 +89,16 @@
|
||||
|
||||
#if (COMPILER_IS_GCC == 1)
|
||||
#define SF_MAX(x,y) ({ \
|
||||
typeof (x) _x = (x) ; \
|
||||
typeof (y) _y = (y) ; \
|
||||
(void) (&_x == &_y) ; \
|
||||
_x > _y ? _x : _y ; })
|
||||
typeof (x) _xmax = (x) ; \
|
||||
typeof (y) _ymax = (y) ; \
|
||||
(void) (&_xmax == &_ymax) ; \
|
||||
_xmax > _ymax ? _xmax : _ymax ; })
|
||||
|
||||
#define SF_MIN(x,y) ({ \
|
||||
typeof (x) _x = (x) ; \
|
||||
typeof (y) _y = (y) ; \
|
||||
(void) (&_x == &_y) ; \
|
||||
_x < _y ? _x : _y ; })
|
||||
typeof (x) _xmin = (x) ; \
|
||||
typeof (y) _ymin = (y) ; \
|
||||
(void) (&_xmin == &_ymin) ; \
|
||||
_xmin < _ymin ? _xmin : _ymin ; })
|
||||
#else
|
||||
#define SF_MAX(a,b) ((a) > (b) ? (a) : (b))
|
||||
#define SF_MIN(a,b) ((a) < (b) ? (a) : (b))
|
||||
|
Loading…
x
Reference in New Issue
Block a user