include: misc: util.h: Rename min/max to MIN/MAX
There are issues using lowercase min and max macros when compiling a C++ application with a third-party toolchain such as GNU ARM Embedded when using some STL headers i.e. <chrono>. This is because there are actual C++ functions called min and max defined in some of the STL headers and these macros interfere with them. By changing the macros to UPPERCASE, which is consistent with almost all other pre-processor macros this naming conflict is avoided. All files that use these macros have been updated. Signed-off-by: Carlos Stuart <carlosstuart1970@gmail.com>
This commit is contained in:
parent
413ede4b89
commit
75f77db432
106 changed files with 229 additions and 229 deletions
|
@ -1452,7 +1452,7 @@ static inline void event_conn_upd_init(struct ll_conn *conn,
|
|||
#if defined(CONFIG_BT_CTLR_XTAL_ADVANCED)
|
||||
if (conn->evt.ticks_xtal_to_start & XON_BITMASK) {
|
||||
u32_t ticks_prepare_to_start =
|
||||
max(conn->evt.ticks_active_to_start,
|
||||
MAX(conn->evt.ticks_active_to_start,
|
||||
conn->evt.ticks_preempt_to_start);
|
||||
|
||||
conn->llcp.conn_upd.ticks_anchor -=
|
||||
|
@ -1620,7 +1620,7 @@ static inline int event_conn_upd_prep(struct ll_conn *conn,
|
|||
/* restore to normal prepare */
|
||||
if (conn->evt.ticks_xtal_to_start & XON_BITMASK) {
|
||||
u32_t ticks_prepare_to_start =
|
||||
max(conn->evt.ticks_active_to_start,
|
||||
MAX(conn->evt.ticks_active_to_start,
|
||||
conn->evt.ticks_preempt_to_start);
|
||||
|
||||
conn->evt.ticks_xtal_to_start &= ~XON_BITMASK;
|
||||
|
@ -1645,7 +1645,7 @@ static inline int event_conn_upd_prep(struct ll_conn *conn,
|
|||
lll->latency_prepare -= (instant_latency - latency);
|
||||
|
||||
/* calculate the offset, window widening and interval */
|
||||
ticks_slot_offset = max(conn->evt.ticks_active_to_start,
|
||||
ticks_slot_offset = MAX(conn->evt.ticks_active_to_start,
|
||||
conn->evt.ticks_xtal_to_start);
|
||||
conn_interval_us = conn->llcp.conn_upd.interval * 1250;
|
||||
periodic_us = conn_interval_us;
|
||||
|
@ -2162,7 +2162,7 @@ static inline void event_conn_param_req(struct ll_conn *conn,
|
|||
#if defined(CONFIG_BT_CTLR_XTAL_ADVANCED)
|
||||
if (conn->evt.ticks_xtal_to_start & XON_BITMASK) {
|
||||
u32_t ticks_prepare_to_start =
|
||||
max(conn->evt.ticks_active_to_start,
|
||||
MAX(conn->evt.ticks_active_to_start,
|
||||
conn->evt.ticks_preempt_to_start);
|
||||
|
||||
conn->llcp_conn_param.ticks_ref -=
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue