mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Use make_intrusive/make_shared for smart pointer construction.
This commit is contained in:
+2
-2
@@ -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"));
|
||||
|
||||
Reference in New Issue
Block a user