]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
autoptr doesn't go with new[]. Simplify that code.
authorheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 2 May 2012 14:53:03 +0000 (14:53 +0000)
committerheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 2 May 2012 14:53:03 +0000 (14:53 +0000)
git-svn-id: https://svn.dealii.org/trunk@25478 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/base/parameter_handler.cc

index 07b152ac53308a26fd64fa447dfef8c38ff11474..25931f3308e9a2d2cbed8bddfee267bfb1c95d0f 100644 (file)
@@ -565,9 +565,8 @@ namespace Patterns
       std::istringstream is(description);
       is.ignore(strlen(description_init) + strlen(" list of <"));
 
-      std::auto_ptr<char> new_description (new char[is.str().size() + 1]);
-      is.getline(&(*new_description), is.str().size(), '>');
-      std::string str(&(*new_description));
+      std::string str;
+      std::getline(is, str, '>');
 
       std::auto_ptr<PatternBase> base_pattern (pattern_factory(str));
 

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.