From: heister Date: Wed, 2 May 2012 14:53:03 +0000 (+0000) Subject: autoptr doesn't go with new[]. Simplify that code. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6f1908aba02256a53e80918a20a2d80f30c9ec72;p=dealii-svn.git autoptr doesn't go with new[]. Simplify that code. git-svn-id: https://svn.dealii.org/trunk@25478 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/source/base/parameter_handler.cc b/deal.II/source/base/parameter_handler.cc index 07b152ac53..25931f3308 100644 --- a/deal.II/source/base/parameter_handler.cc +++ b/deal.II/source/base/parameter_handler.cc @@ -565,9 +565,8 @@ namespace Patterns std::istringstream is(description); is.ignore(strlen(description_init) + strlen(" list of <")); - std::auto_ptr 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 base_pattern (pattern_factory(str));