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 <algorithm>
#include <atomic>
#include <cstddef>
#include <fstream>
@ -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);

View File

@ -4,6 +4,7 @@
#pragma once
#include <array>
#include <cstddef>
#include <mutex>
#include <string>
@ -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<TASInputDlg*, 8> m_tas_input_dialogs{};
bool UseDebugger = false;
bool m_bBatchMode = false;
bool m_bEdit = false;