Minor documentation fixes.

Add extra parenthesis around terms in the common MIN() and MAX() macros to prevent issues with non-trivial macro inputs (thanks to David Lyons).
This commit is contained in:
Dean Camera 2011-08-23 10:39:04 +00:00
parent 2d9f98b592
commit cff190b8f4
7 changed files with 25 additions and 13 deletions

View file

@ -160,7 +160,7 @@
* \return The larger of the two input parameters
*/
#if !defined(MAX) || defined(__DOXYGEN__)
#define MAX(x, y) ((x > y) ? x : y)
#define MAX(x, y) (((x) > (y)) ? (x) : (y))
#endif
/** Convenience macro to determine the smaller of two values.
@ -174,7 +174,7 @@
* \return The smaller of the two input parameters
*/
#if !defined(MIN) || defined(__DOXYGEN__)
#define MIN(x, y) ((x < y) ? x : y)
#define MIN(x, y) (((x) < (y)) ? (x) : (y))
#endif
#if !defined(STRINGIFY) || defined(__DOXYGEN__)