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:
parent
2d9f98b592
commit
cff190b8f4
7 changed files with 25 additions and 13 deletions
|
@ -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__)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue