2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 22:27:43 +00:00

General: Use std::make_unique where applicable

No behavior change.
This commit is contained in:
Lioncash
2019-09-05 18:16:21 -04:00
parent 81beae5526
commit 765c51776b
14 changed files with 118 additions and 106 deletions

View File

@@ -41,10 +41,12 @@ Space::Space(ViewResources& res, View& parentView, ISpaceController& controller,
return true;
});
setBackground(res.themeData().spaceBackground());
if (controller.spaceSplitAllowed())
m_cornerView.m_view.reset(new CornerView(res, *this, TriColor));
if (tbPos != Toolbar::Position::None)
m_toolbar.m_view.reset(new Toolbar(res, *this, tbPos, tbUnits));
if (controller.spaceSplitAllowed()) {
m_cornerView.m_view = std::make_unique<CornerView>(res, *this, TriColor);
}
if (tbPos != Toolbar::Position::None) {
m_toolbar.m_view = std::make_unique<Toolbar>(res, *this, tbPos, tbUnits);
}
}
Space::~Space() = default;