From 9a2eac4e969a4c6c5e50279c181533e12c2544e9 Mon Sep 17 00:00:00 2001 From: maier Date: Wed, 20 Feb 2013 20:11:24 +0000 Subject: [PATCH] Make MSVC a bit happier git-svn-id: https://svn.dealii.org/branches/branch_cmake@28495 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/include/deal.II/base/config.h.in | 15 +++++++++++++-- deal.II/source/base/parameter_handler.cc | 9 --------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/deal.II/include/deal.II/base/config.h.in b/deal.II/include/deal.II/base/config.h.in index 01f220b53a..97a51bc24d 100644 --- a/deal.II/include/deal.II/base/config.h.in +++ b/deal.II/include/deal.II/base/config.h.in @@ -502,7 +502,8 @@ /* Disable a bunch of warnings for Microsoft Visual C++. */ -//#ifdef DEAL_II_MSVC +#ifdef DEAL_II_MSVC + //# pragma warning( disable : 4244 ) /* implied downcasting from double to float */ //# pragma warning( disable : 4267 ) /* implied downcasting from size_t to unsigned int */ //# pragma warning( disable : 4996 ) /* unsafe functions, such as strcat and sprintf */ @@ -515,7 +516,17 @@ //# pragma warning( disable : 4700 ) /* uninitialized local variable */ //# pragma warning( disable : 4789 ) /* destination of memory copy is too small */ //# pragma warning( disable : 4808 ) /* case 'value' is not a valid value for switch condition of type 'bool */ -//#endif // DEAL_II_MSVC + +/* + * On Windows systems with MS Visual C/C++, there is a + * #define for 'max' that collides with std::max. So, if + * we find that this is indeed the case, #undef it + */ +# if defined(max) +# undef max +# endif +#endif // DEAL_II_MSVC + #include #include diff --git a/deal.II/source/base/parameter_handler.cc b/deal.II/source/base/parameter_handler.cc index 8227166e21..cacee191a2 100644 --- a/deal.II/source/base/parameter_handler.cc +++ b/deal.II/source/base/parameter_handler.cc @@ -32,15 +32,6 @@ #include -#ifdef DEAL_II_MSVC -// on Windows systems with MS Visual C/C++, there is a -// #define for 'max' that collides with std::max. So, if -// we find that this is indeed the case, #undef it -# if defined(max) -# undef max -# endif -#endif - DEAL_II_NAMESPACE_OPEN -- 2.39.5