mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-14 04:00:33 +01:00
glib: undef MIN()/MAX() to make it unusable (use NM variants)
NM variants: - evaluate arguments only once - have a static assertion that the signedness of the argument agrees. Like MIN()/MAX(), NM_MIN()/NM_MAX() now also evaluate to a constant expression, if the arguments are already constant. That means, the only reason why MIN()/MAX() was preferable over NM_MIN()/NM_MAX() is no longer relevant. Except there are a few places where NM_MIN()/NM_MAX() cannot be used. In those places use NM_MIN_CONST()/NM_MAX_CONST().
This commit is contained in:
parent
bee14cf47c
commit
21c979eb17
1 changed files with 6 additions and 0 deletions
|
|
@ -766,4 +766,10 @@ _nm_deprecated("Don't use this API") void _nm_forbidden_glib_api_n(gconstpointer
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
/* Use either NM_MIN()/NM_MAX() or (if that doesn't work) use NM_MIN_CONST()/NM_MAX_CONST(). */
|
||||
#undef MIN
|
||||
#undef MAX
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#endif /* __NM_GLIB_H__ */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue