From ff66ca022e4594766dce395257bcbed446ad7869 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 3 Feb 2009 20:26:26 +0000 Subject: [PATCH] Clean up warning disable code --- include/osgIntrospection/Export | 11 +++++------ include/osgIntrospection/TypedMethodInfo | 10 ---------- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/include/osgIntrospection/Export b/include/osgIntrospection/Export index f19f72836..67a639aec 100644 --- a/include/osgIntrospection/Export +++ b/include/osgIntrospection/Export @@ -15,13 +15,12 @@ #ifndef OSGINTROSPECTION_EXPORTHDR #define OSGINTROSPECTION_EXPORTHDR 1 -// define USE_DEPRECATED_API is used to include in API which is being fazed out -// if you can compile your apps with this turned off you are -// well placed for compatablity with future versions. -//#define USE_DEPRECATED_API -#if defined(_MSC_VER) - #pragma warning(disable : 4251) +#if defined(_MSC_VER) && defined(OSG_DISABLE_MSVC_WARNINGS) + #pragma warning( disable : 4251 ) + #pragma warning( disable : 4121 ) + #pragma warning( disable : 4180 ) + #pragma warning( disable : 4702 ) #endif #if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) || defined( __BCPLUSPLUS__) || defined( __MWERKS__) diff --git a/include/osgIntrospection/TypedMethodInfo b/include/osgIntrospection/TypedMethodInfo index 6ef7ee225..ec8ac74f0 100644 --- a/include/osgIntrospection/TypedMethodInfo +++ b/include/osgIntrospection/TypedMethodInfo @@ -15,12 +15,6 @@ #ifndef OSGINTROSPECTION_TYPEDMETHODINFO_ #define OSGINTROSPECTION_TYPEDMETHODINFO_ -#if defined(_MSC_VER) && defined(OSG_DISABLE_MSVC_WARNINGS) - // disable for this header the VS warning C4121 : "alignment of a member was sensitive to packing" - #pragma warning( push ) - #pragma warning( disable : 4121) -#endif - #include #include #include @@ -3907,9 +3901,5 @@ namespace osgIntrospection } -#if defined(_MSC_VER) - #pragma warning( pop ) -#endif - #endif