Skip to content

Commit f7f2a51

Browse files
Merge pull request FabioBatSilva#15 from arduhe/clashmin
avoid clashes with std::min and std:max from STL
2 parents 5f003df + cd35dbc commit f7f2a51

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy