]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Make MSVC a bit happier
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 20 Feb 2013 20:11:24 +0000 (20:11 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 20 Feb 2013 20:11:24 +0000 (20:11 +0000)
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
deal.II/source/base/parameter_handler.cc

index 01f220b53a2f0d3089fe4a44204e7b0558dd2127..97a51bc24d35e17487889b37e5bb58f0b38d0ec3 100644 (file)
 
 
 /* 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 */
 //#  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 <deal.II/base/numbers.h>
 #include <deal.II/base/types.h>
index 8227166e21a6726ec85790c53d43215a74759471..cacee191a2df829cc14bb63243f49b145eb1bd82 100644 (file)
 #include <limits>
 
 
-#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
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.