Skip to content

Commit cd35dbc

Browse files
author
hst
committed
avoid clashes with std::min and std:max from STL
1 parent 5f003df commit cd35dbc

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/arduino/Arduino.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,10 @@ void yield(void);
8888
#undef abs
8989
#endif
9090

91+
#ifndef __cplusplus
9192
#define min(a,b) ((a)<(b)?(a):(b))
9293
#define max(a,b) ((a)>(b)?(a):(b))
94+
#endif
9395
#define abs(x) ((x)>0?(x):-(x))
9496
#define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt)))
9597
#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))

0 commit comments

Comments
 (0)