We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent def8586 commit 55539aeCopy full SHA for 55539ae
cores/esp8266/Arduino.h
@@ -251,8 +251,8 @@ using std::max;
251
using std::isinf;
252
using std::isnan;
253
254
-#define _min(a,b) ((a)<(b)?(a):(b))
255
-#define _max(a,b) ((a)>(b)?(a):(b))
+#define _min(a,b) ({ decltype(a) _a = (a); decltype(b) _b = (b); _a < _b? _a : _b; })
+#define _max(a,b) ({ decltype(a) _a = (a); decltype(b) _b = (b); _a > _b? _a : _b; })
256
257
uint16_t makeWord(uint16_t w);
258
uint16_t makeWord(byte h, byte l);
0 commit comments