Skip to content

Commit a3bf316

Browse files
committed
Use min and max from std::
1 parent 4b3c36b commit a3bf316

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

cores/esp8266/Arduino.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ void optimistic_yield(uint32_t interval_us);
237237
#endif
238238

239239
#ifdef __cplusplus
240-
240+
#include <algorithm>
241241
#include "pgmspace.h"
242242

243243
#include "WCharacter.h"
@@ -248,11 +248,8 @@ void optimistic_yield(uint32_t interval_us);
248248
#include "Updater.h"
249249
#include "debug.h"
250250

251-
#ifndef _GLIBCXX_VECTOR
252-
// arduino is not compatible with std::vector
253-
#define min(a,b) ((a)<(b)?(a):(b))
254-
#define max(a,b) ((a)>(b)?(a):(b))
255-
#endif
251+
using std::min;
252+
using std::max;
256253

257254
#define _min(a,b) ((a)<(b)?(a):(b))
258255
#define _max(a,b) ((a)>(b)?(a):(b))

0 commit comments

Comments
 (0)