Skip to content

Commit

Permalink
Use min and max from std::
Browse files Browse the repository at this point in the history
  • Loading branch information
igrr committed Nov 5, 2017
1 parent 063c237 commit dfcaa1b
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions cores/esp8266/Arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ void optimistic_yield(uint32_t interval_us);
#endif

#ifdef __cplusplus

#include <algorithm>
#include "pgmspace.h"

#include "WCharacter.h"
Expand All @@ -247,11 +247,8 @@ void optimistic_yield(uint32_t interval_us);
#include "Updater.h"
#include "debug.h"

#ifndef _GLIBCXX_VECTOR
// arduino is not compatible with std::vector
#define min(a,b) ((a)<(b)?(a):(b))
#define max(a,b) ((a)>(b)?(a):(b))
#endif
using std::min;
using std::max;

#define _min(a,b) ((a)<(b)?(a):(b))
#define _max(a,b) ((a)>(b)?(a):(b))
Expand Down

0 comments on commit dfcaa1b

Please sign in to comment.