Skip to content

Commit fedf4d4

Browse files
committed
Update wirish_math.h - fix GCC 4.8 error related to min and max
1 parent 162ecbf commit fedf4d4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

STM32F1/cores/maple/wirish_math.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ long random(long min, long max);
105105
#define SERIAL 0x0
106106
#define DISPLAY 0x1
107107

108-
#ifdef __cplusplus
108+
#if (__GNUC__ > 4) && defined(__cplusplus)
109109
#include <algorithm>
110110
using namespace std;
111111
#else // C

STM32F4/cores/maple/wirish_math.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ long random(long min, long max);
9191
#define DEG_TO_RAD 0.017453292519943295769236907684886
9292
#define RAD_TO_DEG 57.295779513082320876798154814105
9393

94-
#ifdef __cplusplus
94+
#if (__GNUC__ > 4) && defined(__cplusplus)
9595
#include <algorithm>
9696
using std::min;
9797
using std::max;

0 commit comments

Comments
 (0)