Skip to content

Commit 0720039

Browse files
committed
Fix includes for M_PI on Windows
1 parent 490d984 commit 0720039

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

examples/OSMPDummySensor_flat/OSMPDummySensor.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
99
*/
1010

11+
#ifndef _USE_MATH_DEFINES
12+
#define _USE_MATH_DEFINES
13+
#endif
14+
1115
#include "OSMPDummySensor.h"
1216

1317
/*
@@ -47,9 +51,13 @@
4751
#include <string>
4852
#include <algorithm>
4953
#include <cstdint>
50-
#include <cmath>
5154
#include <chrono>
5255

56+
#ifdef _WIN32
57+
#include <math.h>
58+
#else
59+
#include <cmath>
60+
5361
using namespace std;
5462

5563
#ifdef PRIVATE_LOG_PATH

examples/OSMPDummySource_flat/OSMPDummySource.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
99
*/
1010

11+
#ifndef _USE_MATH_DEFINES
12+
#define _USE_MATH_DEFINES
13+
#endif
14+
1115
#include "OSMPDummySource.h"
1216

1317
/*
@@ -47,12 +51,16 @@
4751
//#include <string>
4852
#include <algorithm>
4953
#include <cstdint>
50-
#include <cmath>
5154
#include <chrono>
5255
#include <ctime>
5356
#include <iomanip>
5457
#include <sstream> //included for windows compatibility
5558

59+
#ifdef _WIN32
60+
#include <math.h>
61+
#else
62+
#include <cmath>
63+
5664
using namespace std;
5765

5866
#ifdef PRIVATE_LOG_PATH

0 commit comments

Comments
 (0)