2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 04:27:42 +00:00

General: Use unique_ptr for UI instances

Gets rid of the need for manual new and delete.
This commit is contained in:
Lioncash
2019-08-25 20:50:17 -04:00
parent a357648a99
commit 02e910c4ef
4 changed files with 20 additions and 17 deletions

View File

@@ -57,10 +57,10 @@ const QStringList MainWindow::skUpdateTracks = QStringList() << "stable" << "dev
MainWindow::MainWindow(QWidget* parent)
: QMainWindow(parent)
, m_ui(std::make_unique<Ui::MainWindow>())
, m_fileMgr(_SYS_STR("urde"))
, m_cvarManager(m_fileMgr)
, m_cvarCommons(m_cvarManager)
, m_ui(new Ui::MainWindow)
, m_heclProc(this)
, m_dlManager(this)
, m_launchMenu(m_cvarCommons, this) {
@@ -109,7 +109,6 @@ MainWindow::MainWindow(QWidget* parent)
MainWindow::~MainWindow() {
KillProcessTree(m_heclProc);
delete m_ui;
}
void MainWindow::onExtract() {