Frame: Convert TAS dialog C array to std::array

This commit is contained in:
Lioncash 2017-04-02 03:04:50 -04:00
parent 678905764a
commit c09f7bd84b
2 changed files with 5 additions and 3 deletions

View File

@ -4,6 +4,7 @@
#include "DolphinWX/Frame.h" #include "DolphinWX/Frame.h"
#include <algorithm>
#include <atomic> #include <atomic>
#include <cstddef> #include <cstddef>
#include <fstream> #include <fstream>
@ -501,8 +502,8 @@ void CFrame::BindEvents()
void CFrame::InitializeTASDialogs() void CFrame::InitializeTASDialogs()
{ {
for (int i = 0; i < 8; ++i) std::generate(m_tas_input_dialogs.begin(), m_tas_input_dialogs.end(),
m_tas_input_dialogs[i] = new TASInputDlg(this); [this] { return new TASInputDlg{this}; });
Movie::SetGCInputManip([this](GCPadStatus* pad_status, int controller_id) { Movie::SetGCInputManip([this](GCPadStatus* pad_status, int controller_id) {
m_tas_input_dialogs[controller_id]->GetValues(pad_status); m_tas_input_dialogs[controller_id]->GetValues(pad_status);

View File

@ -4,6 +4,7 @@
#pragma once #pragma once
#include <array>
#include <cstddef> #include <cstddef>
#include <mutex> #include <mutex>
#include <string> #include <string>
@ -137,7 +138,7 @@ private:
CLogWindow* m_LogWindow = nullptr; CLogWindow* m_LogWindow = nullptr;
LogConfigWindow* m_LogConfigWindow = nullptr; LogConfigWindow* m_LogConfigWindow = nullptr;
FifoPlayerDlg* m_FifoPlayerDlg = nullptr; FifoPlayerDlg* m_FifoPlayerDlg = nullptr;
TASInputDlg* m_tas_input_dialogs[8]; std::array<TASInputDlg*, 8> m_tas_input_dialogs{};
bool UseDebugger = false; bool UseDebugger = false;
bool m_bBatchMode = false; bool m_bBatchMode = false;
bool m_bEdit = false; bool m_bEdit = false;