Use make_intrusive/make_shared for smart pointer construction.

This commit is contained in:
Twan van Laarhoven
2020-04-23 23:51:34 +02:00
parent 815df01ba5
commit 708b4389a0
67 changed files with 313 additions and 329 deletions
+2 -2
View File
@@ -17,8 +17,8 @@ VCSP read_new<VCS>(Reader& reader) {
// there must be a type specified
String type;
reader.handle(_("type"), type);
if (type == _("none")) return intrusive(new VCS);
else if (type == _("subversion")) return intrusive(new SubversionVCS);
if (type == _("none")) return make_intrusive<VCS>();
else if (type == _("subversion")) return make_intrusive<SubversionVCS>();
else if (type.empty()) {
reader.warning(_ERROR_1_("expected key", _("version control system")));
throw ParseError(_ERROR_("aborting parsing"));