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
@@ -214,7 +214,7 @@ PackagesWindow::PackagesWindow(Window* parent, const InstallerP& installer)
{
init(parent, true);
// add installer
merge(installable_packages, intrusive(new DownloadableInstaller(installer)));
merge(installable_packages, make_intrusive<DownloadableInstaller>(installer));
FOR_EACH(p, installable_packages) p->determineStatus();
// mark all packages in the installer for installation
FOR_EACH(ip, installable_packages) {
@@ -353,7 +353,7 @@ void PackagesWindow::onOk(wxCommandEvent& ev) {
os.Write(*is);
os.Close();
// open installer
ip->installer->installer = intrusive(new Installer());
ip->installer->installer = make_intrusive<Installer>();
ip->installer->installer->open(ip->installer->installer_file);
}
}