From e9bde59fbcd1191f0a1db70179be36b2c1443c35 Mon Sep 17 00:00:00 2001 From: David Williams Date: Fri, 8 May 2015 15:20:29 +0200 Subject: [PATCH] Moved more code into PlatformDefinitions.h --- include/PolyVox/Impl/ErrorHandling.h | 13 ------------- include/PolyVox/Impl/PlatformDefinitions.h | 13 +++++++++++++ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/include/PolyVox/Impl/ErrorHandling.h b/include/PolyVox/Impl/ErrorHandling.h index 5b9544f9..3e32c77e 100644 --- a/include/PolyVox/Impl/ErrorHandling.h +++ b/include/PolyVox/Impl/ErrorHandling.h @@ -35,19 +35,6 @@ freely, subject to the following restrictions: #include // Exception constuctors take strings. #include -// Macros cannot contain #ifdefs, but some of our macros need to disable warnings and such warning supression is -// platform specific. But macros can contain other macros, so we create macros to control the warnings and use -// those instead. This set of warning supression macros can be extended to GCC/Clang when required. -#if defined(_MSC_VER) - #define POLYVOX_MSC_WARNING_PUSH __pragma(warning(push)) - #define POLYVOX_DISABLE_MSC_WARNING(x) __pragma(warning(disable:x)) - #define POLYVOX_MSC_WARNING_POP __pragma(warning(pop)) -#else - #define POLYVOX_MSC_WARNING_PUSH - #define POLYVOX_DISABLE_MSC_WARNING(x) - #define POLYVOX_MSC_WARNING_POP -#endif - /* * Assertions * ---------- diff --git a/include/PolyVox/Impl/PlatformDefinitions.h b/include/PolyVox/Impl/PlatformDefinitions.h index 54197690..4d3c1f89 100644 --- a/include/PolyVox/Impl/PlatformDefinitions.h +++ b/include/PolyVox/Impl/PlatformDefinitions.h @@ -32,6 +32,19 @@ freely, subject to the following restrictions: #error "Your version of Visual Studio is too old to build PolyVox. You need at least version Visual Stusio 2013" #endif +// Macros cannot contain #ifdefs, but some of our macros need to disable warnings and such warning supression is +// platform specific. But macros can contain other macros, so we create macros to control the warnings and use +// those instead. This set of warning supression macros can be extended to GCC/Clang when required. +#if defined(_MSC_VER) + #define POLYVOX_MSC_WARNING_PUSH __pragma(warning(push)) + #define POLYVOX_DISABLE_MSC_WARNING(x) __pragma(warning(disable:x)) + #define POLYVOX_MSC_WARNING_POP __pragma(warning(pop)) +#else + #define POLYVOX_MSC_WARNING_PUSH + #define POLYVOX_DISABLE_MSC_WARNING(x) + #define POLYVOX_MSC_WARNING_POP +#endif + // Used to mark functions as deprecated prior to us removing them. #if defined _WIN32 || defined __CYGWIN__ #define POLYVOX_DEPRECATED __declspec(deprecated)