Moved the MIN() macro to the helper include.
Removed multiple definitions of the MIN() macro from existing locations and unified with a single definition. Updated sources to use the shared version. Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
This commit is contained in:
committed by
Bryce Harrington
parent
35b2eaa989
commit
d618f688d5
@@ -41,6 +41,17 @@ extern "C" {
|
||||
#define ARRAY_LENGTH(a) (sizeof (a) / sizeof (a)[0])
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Returns the smaller of two values.
|
||||
*
|
||||
* @param x the first item to compare.
|
||||
* @param y the second item to compare.
|
||||
* @return the value that evaluates to lesser than the other.
|
||||
*/
|
||||
#ifndef MIN
|
||||
#define MIN(x,y) (((x) < (y)) ? (x) : (y))
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user