]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Use standard C++ calls to string::replace (pointed out by John Burnell.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 8 Sep 2000 09:45:08 +0000 (09:45 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 8 Sep 2000 09:45:08 +0000 (09:45 +0000)
git-svn-id: https://svn.dealii.org/trunk@3309 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/source/parameter_handler.cc

index 604e74b0bf87ea88916181e056604ac3dfe7c8aa..b35ecae774b1f37649dcecc8e389b9f6cefe3102 100644 (file)
@@ -151,9 +151,9 @@ namespace Patterns
     sequence = seq;
 
     while (sequence.find(" |") != string::npos)
-      sequence.replace (sequence.find(" |"), 2, '|');
+      sequence.replace (sequence.find(" |"), 2, "|");
     while (sequence.find("| ") != string::npos)
-      sequence.replace (sequence.find("| "), 2, '|');
+      sequence.replace (sequence.find("| "), 2, "|");
   };
 
 
@@ -201,9 +201,9 @@ namespace Patterns
   
     sequence = seq;
     while (sequence.find(" |") != string::npos)
-      sequence.replace (sequence.find(" |"), 2, '|');
+      sequence.replace (sequence.find(" |"), 2, "|");
     while (sequence.find("| ") != string::npos)
-      sequence.replace (sequence.find("| "), 2, '|');
+      sequence.replace (sequence.find("| "), 2, "|");
   };
 
 
@@ -762,9 +762,9 @@ bool ParameterHandler::scan_line (string line,
   if (line.find('#') != string::npos)
     line.erase (line.find("#"), string::npos);
                                   // replace every whitespace sequence
-                                  // by ' '
+                                  // by " "
   while (line.find('\t') != string::npos)
-    line.replace (line.find('\t'), 1, ' ');
+    line.replace (line.find('\t'), 1, " ");
   while (line.find("  ") != string::npos)
     line.erase (line.find("  "), 1);
                                   // now every existing whitespace
@@ -1205,9 +1205,9 @@ void MultipleParameterLoop::Entry::split_different_values ()
   
                                   // delete spaces around '|'
   while (multiple.find(" |") != string::npos)
-    multiple.replace (multiple.find(" |"), 2, '|');
+    multiple.replace (multiple.find(" |"), 2, "|");
   while (multiple.find("| ") != string::npos)
-    multiple.replace (multiple.find("| "), 2, '|');
+    multiple.replace (multiple.find("| "), 2, "|");
 
   while (multiple.find('|') != string::npos) 
     {

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.