]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Simplify filename creation
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 6 Nov 2006 04:24:48 +0000 (04:24 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 6 Nov 2006 04:24:48 +0000 (04:24 +0000)
git-svn-id: https://svn.dealii.org/trunk@14154 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/examples/step-23/step-23.cc

index 487f44495faeb8308afff908f2fe5f7968b3e421..2a689d328abe1ccc92a6030aaab6276fd53712e0 100644 (file)
@@ -44,7 +44,6 @@
 
 #include <fstream>
 #include <iostream>
-#include <sstream>
 
                                 // Here are the only three include
                                 // files of some new interest: The
@@ -545,11 +544,10 @@ void WaveEquation<dim>::output_results () const
 
   data_out.build_patches ();
 
-  std::ostringstream filename;
-  filename << "solution-"
-          << Utilities::int_to_string (timestep_number, 3)
-          << ".gnuplot";
-  std::ofstream output (filename.str().c_str());
+  std::string filename = "solution-" +
+                        Utilities::int_to_string (timestep_number, 3) +
+                        ".gnuplot";
+  std::ofstream output (filename.c_str());
   data_out.write_gnuplot (output);
 }
 

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.