summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2020-04-22 09:04:03 +0200
committerKjell Ahlstedt <kjellahlstedt@gmail.com>2020-04-22 09:04:03 +0200
commitc3ed605c8bb69b720ce95e537b5720c7a61ba64b (patch)
treee50eab42c664c8d93ff55ef2db18071fff9653a7
parent60806f01f6986abce71213d31a7101fc0f382b36 (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 #7
-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 382c2f1..ab50cec 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 2fb0d08..6b1cf5f 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 31cde98..a38c590 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>