diff --git a/Source/Core/DolphinWX/Frame.cpp b/Source/Core/DolphinWX/Frame.cpp index 73d4c497bd..0675d4ad32 100644 --- a/Source/Core/DolphinWX/Frame.cpp +++ b/Source/Core/DolphinWX/Frame.cpp @@ -4,6 +4,7 @@ #include "DolphinWX/Frame.h" +#include #include #include #include @@ -501,8 +502,8 @@ void CFrame::BindEvents() void CFrame::InitializeTASDialogs() { - for (int i = 0; i < 8; ++i) - m_tas_input_dialogs[i] = new TASInputDlg(this); + std::generate(m_tas_input_dialogs.begin(), m_tas_input_dialogs.end(), + [this] { return new TASInputDlg{this}; }); Movie::SetGCInputManip([this](GCPadStatus* pad_status, int controller_id) { m_tas_input_dialogs[controller_id]->GetValues(pad_status); diff --git a/Source/Core/DolphinWX/Frame.h b/Source/Core/DolphinWX/Frame.h index eec1ee0ab8..ea76cc360b 100644 --- a/Source/Core/DolphinWX/Frame.h +++ b/Source/Core/DolphinWX/Frame.h @@ -4,6 +4,7 @@ #pragma once +#include #include #include #include @@ -137,7 +138,7 @@ private: CLogWindow* m_LogWindow = nullptr; LogConfigWindow* m_LogConfigWindow = nullptr; FifoPlayerDlg* m_FifoPlayerDlg = nullptr; - TASInputDlg* m_tas_input_dialogs[8]; + std::array m_tas_input_dialogs{}; bool UseDebugger = false; bool m_bBatchMode = false; bool m_bEdit = false;