]> https://gitweb.dealii.org/ - dealii.git/commitdiff
data_out_base.cc: Guard anonymous namespace 17831/head
authorPeter Munch <peterrmuench@gmail.com>
Sun, 3 Nov 2024 18:58:49 +0000 (19:58 +0100)
committerPeter Munch <peterrmuench@gmail.com>
Sun, 3 Nov 2024 18:58:49 +0000 (19:58 +0100)
source/base/data_out_base.cc

index d23ebe95024c6ae69e0757cc8577ae08b0ffaf8e..650859e76283d0ea11c07c6af56d0c4b700232d1 100644 (file)
@@ -55,6 +55,7 @@
 
 DEAL_II_NAMESPACE_OPEN
 
+#ifndef DOXYGEN
 // we need the following exception from a global function, so can't declare it
 // in the usual way inside a class
 namespace
@@ -64,19 +65,15 @@ namespace
                  std::string,
                  << "Unexpected input: expected line\n  <" << arg1
                  << ">\nbut got\n  <" << arg2 << ">");
-}
-
 
-namespace
-{
-#ifdef DEAL_II_WITH_ZLIB
+#  ifdef DEAL_II_WITH_ZLIB
   constexpr bool deal_ii_with_zlib = true;
-#else
+#  else
   constexpr bool deal_ii_with_zlib = false;
-#endif
+#  endif
 
 
-#ifdef DEAL_II_WITH_ZLIB
+#  ifdef DEAL_II_WITH_ZLIB
   /**
    * Convert between the CompressionLevel enum (used inside VtkFlags
    * for example) and the preprocessor constant defined by zlib.
@@ -100,7 +97,7 @@ namespace
       }
   }
 
-#  ifdef DEAL_II_WITH_MPI
+#    ifdef DEAL_II_WITH_MPI
   /**
    * Convert between the CompressionLevel enum and the preprocessor
    * constant defined by boost::iostreams::zlib.
@@ -123,8 +120,8 @@ namespace
           return boost::iostreams::zlib::no_compression;
       }
   }
+#    endif
 #  endif
-#endif
 
   /**
    * Do a zlib compression followed by a base64 encoding of the given data. The
@@ -135,7 +132,7 @@ namespace
   compress_array(const std::vector<T>               &data,
                  const DataOutBase::CompressionLevel compression_level)
   {
-#ifdef DEAL_II_WITH_ZLIB
+#  ifdef DEAL_II_WITH_ZLIB
     if (data.size() != 0)
       {
         const std::size_t uncompressed_size = (data.size() * sizeof(T));
@@ -186,14 +183,14 @@ namespace
       }
     else
       return {};
-#else
+#  else
     (void)data;
     (void)compression_level;
     Assert(false,
            ExcMessage("This function can only be called if cmake found "
                       "a working libz installation."));
     return {};
-#endif
+#  endif
   }
 
 
@@ -248,11 +245,13 @@ namespace
     std::uint64_t n_patches;
   };
 } // namespace
+#endif
 
 
 // some declarations of functions and locally used classes
 namespace DataOutBase
 {
+#ifndef DOXYGEN
   namespace
   {
     /**
@@ -417,6 +416,8 @@ namespace DataOutBase
   } // namespace
 
 
+#endif
+
 
   DataOutFilter::DataOutFilter()
     : flags(false, true)

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.