]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Where possible, replace '#ifdef DEBUG' by 'if constexpr(...debug mode...') in examples/.
authorWolfgang Bangerth <bangerth@colostate.edu>
Thu, 27 Feb 2025 22:00:58 +0000 (15:00 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Thu, 27 Feb 2025 22:00:58 +0000 (15:00 -0700)
examples/step-62/step-62.cc

index 4cd36262f37af085b54c687ccc5806b69dd694a9..7a5e658474a08b79115ea320dde5b0dc7526099f 100644 (file)
@@ -1317,11 +1317,10 @@ namespace step62
   template <int dim>
   void ElasticWave<dim>::run()
   {
-#ifdef DEBUG
-    pcout << "Debug mode" << std::endl;
-#else
-    pcout << "Release mode" << std::endl;
-#endif
+    if constexpr (running_in_debug_mode())
+      pcout << "Debug mode" << std::endl;
+    else
+      pcout << "Release mode" << std::endl;
 
     {
       Point<dim> p1;

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.