]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Only print default value if different from actual value.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 21 Nov 2003 16:34:24 +0000 (16:34 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 21 Nov 2003 16:34:24 +0000 (16:34 +0000)
git-svn-id: https://svn.dealii.org/trunk@8194 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/parameter_handler.h
deal.II/base/source/parameter_handler.cc

index 36c36f0a5fddfd1e31fe5ea97b06bebc30caec54..141683674649587c7b4d2b44cb76933992387924 100644 (file)
@@ -1403,10 +1403,12 @@ class ParameterHandler
                                      * Besides the name and value of
                                      * each entry, the output also
                                      * contains the default value of
-                                     * entries as well as the
-                                     * documenting string given to
-                                     * the @ref{declare_entry}
-                                     * function if available.
+                                     * entries if it is different
+                                     * from the actual value, as well
+                                     * as the documenting string
+                                     * given to the
+                                     * @ref{declare_entry} function
+                                     * if available.
                                      */
     std::ostream & print_parameters (std::ostream      &out,
                                     const OutputStyle  style);
index 2ac469f97f7728e74ee7c4708504ce4bb9687117..05203e5eab22e551fafd354fbfe99726e93b40ed 100644 (file)
@@ -921,9 +921,12 @@ ParameterHandler::print_parameters_section (std::ostream      &out,
               out << pd->entries[ptr->first].documentation << ", ";
             
                                              // finally print the
-                                             // default value
-            out << "default: " << pd->entries[ptr->first].value
-                << std::endl;
+                                             // default value, but
+                                             // only if it differs
+                                             // from the actual value
+            if (value != pd->entries[ptr->first].value)
+              out << "default: " << pd->entries[ptr->first].value
+                  << std::endl;
           }
         
         break;

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.