Skip to content

Commit

Permalink
Merge pull request esp8266#4 from esp8266/master
Browse files Browse the repository at this point in the history
fix _min and _max macros (esp8266#6374)
  • Loading branch information
Jason2866 authored Aug 20, 2019
2 parents 27f8893 + 55539ae commit 093471f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cores/esp8266/Arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@ using std::max;
using std::isinf;
using std::isnan;

#define _min(a,b) ((a)<(b)?(a):(b))
#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; })

uint16_t makeWord(uint16_t w);
uint16_t makeWord(byte h, byte l);
Expand Down

0 comments on commit 093471f

Please sign in to comment.