summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2020-04-22 09:55:01 +0200
committerKjell Ahlstedt <kjellahlstedt@gmail.com>2020-04-22 09:55:01 +0200
commit3af09c24aa1d993bbf0821a2714bc80d4a5d41ff (patch)
tree6024fb55e514e17660cf24322c24e86cd96dd5f6
parent5c0f73ab8399b97f17951a8b0d9bad3c9d6cae86 (diff)
Sources: Remove #define _USE_MATH_DEFINES
We now pass in /D_USE_MATH_DEFINES in our NMake compiler flags, so there is no need to define them in the sources. This will silence C4005 warnings (macro redefinition) in Visual Studio builds. Fixes #17
-rw-r--r--cairomm/context.cc3
-rw-r--r--examples/surfaces/image-surface.cc3
-rw-r--r--examples/surfaces/pdf-surface.cc3
-rw-r--r--examples/surfaces/ps-surface.cc3
-rw-r--r--examples/surfaces/svg-surface.cc3
-rw-r--r--examples/text/text-rotate.cc3
6 files changed, 0 insertions, 18 deletions
diff --git a/cairomm/context.cc b/cairomm/context.cc
index 466f7e3..04f03fa 100644
--- a/cairomm/context.cc
+++ b/cairomm/context.cc
@@ -17,9 +17,6 @@
*/
/* M_PI is defined in math.h in the case of Microsoft Visual C++ */
-#if defined(_WIN32)
-#define _USE_MATH_DEFINES
-#endif
#include <cairommconfig.h>
#include <cairomm/context.h>
diff --git a/examples/surfaces/image-surface.cc b/examples/surfaces/image-surface.cc
index 9318a1a..6a8ca2a 100644
--- a/examples/surfaces/image-surface.cc
+++ b/examples/surfaces/image-surface.cc
@@ -1,9 +1,6 @@
/* M_PI is defined in math.h in the case of Microsoft Visual C++, Solaris,
* et. al.
*/
-#if defined(_MSC_VER)
-#define _USE_MATH_DEFINES
-#endif
#include <string>
#include <iostream>
diff --git a/examples/surfaces/pdf-surface.cc b/examples/surfaces/pdf-surface.cc
index dd7a36d..e4c99ad 100644
--- a/examples/surfaces/pdf-surface.cc
+++ b/examples/surfaces/pdf-surface.cc
@@ -1,9 +1,6 @@
/* M_PI is defined in math.h in the case of Microsoft Visual C++, Solaris,
* et. al.
*/
-#if defined(_MSC_VER)
-#define _USE_MATH_DEFINES
-#endif
#include <string>
#include <iostream>
diff --git a/examples/surfaces/ps-surface.cc b/examples/surfaces/ps-surface.cc
index 3035c22..1ae0bfa 100644
--- a/examples/surfaces/ps-surface.cc
+++ b/examples/surfaces/ps-surface.cc
@@ -1,9 +1,6 @@
/* M_PI is defined in math.h in the case of Microsoft Visual C++, Solaris,
* et. al.
*/
-#if defined(_MSC_VER)
-#define _USE_MATH_DEFINES
-#endif
#include <string>
#include <iostream>
diff --git a/examples/surfaces/svg-surface.cc b/examples/surfaces/svg-surface.cc
index cf51d5f..f1c6624 100644
--- a/examples/surfaces/svg-surface.cc
+++ b/examples/surfaces/svg-surface.cc
@@ -1,9 +1,6 @@
/* M_PI is defined in math.h in the case of Microsoft Visual C++, Solaris,
* et. al.
*/
-#if defined(_MSC_VER)
-#define _USE_MATH_DEFINES
-#endif
#include <string>
#include <iostream>
diff --git a/examples/text/text-rotate.cc b/examples/text/text-rotate.cc
index 3a94280..020b09c 100644
--- a/examples/text/text-rotate.cc
+++ b/examples/text/text-rotate.cc
@@ -19,9 +19,6 @@
/* M_PI is defined in math.h in the case of Microsoft Visual C++, and
* Solaris needs math.h for M_PI and floor()
*/
-#if defined(_MSC_VER)
-#define _USE_MATH_DEFINES
-#endif
#include <string>
#include <iostream>