From: Timo Heister Date: Wed, 2 May 2012 14:53:03 +0000 (+0000) Subject: autoptr doesn't go with new[]. Simplify that code. X-Git-Tag: v8.0.0~2634 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4bb01968404a8f459d2424eb8154299678dcb276;p=dealii.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));