replaced all unique_ptr.reset calls with std::make_unique

This commit is contained in:
Niall Cooling
2021-03-22 17:56:26 +00:00
parent e5e3fc02b8
commit 8eb947a223
7 changed files with 45 additions and 39 deletions

View File

@@ -56,7 +56,7 @@ std::unique_ptr<Screen> ApplicationList::CreateScreen1() {
};
return std::unique_ptr<Screen>(new Screens::Tile(0, app, settingsController, applications));
return std::make_unique<Screens::Tile>(0, app, settingsController, applications);
}
std::unique_ptr<Screen> ApplicationList::CreateScreen2() {
@@ -70,7 +70,7 @@ std::unique_ptr<Screen> ApplicationList::CreateScreen2() {
}
};
return std::unique_ptr<Screen>(new Screens::Tile(1, app, settingsController, applications));
return std::make_unique<Screens::Tile>(1, app, settingsController, applications);
}
std::unique_ptr<Screen> ApplicationList::CreateScreen3() {
@@ -84,6 +84,6 @@ std::unique_ptr<Screen> ApplicationList::CreateScreen3() {
}
};
return std::unique_ptr<Screen>(new Screens::Tile(2, app, settingsController, applications));
return std::make_unique<Screens::Tile>(2, app, settingsController, applications);
}