GCMemcardManager: Shorten-up EnumMap definitions

We can make a small alias that gets rid of the need to repeat the long
constant.
This commit is contained in:
Lioncash 2023-06-08 13:05:10 -04:00
parent 1044bc40ca
commit 349add0f81
1 changed files with 11 additions and 10 deletions

View File

@ -88,16 +88,17 @@ private:
QPushButton* m_fix_checksums_button;
// Slots
Common::EnumMap<std::map<u8, IconAnimationData>, ExpansionInterface::MAX_MEMCARD_SLOT>
m_slot_active_icons;
Common::EnumMap<std::unique_ptr<Memcard::GCMemcard>, ExpansionInterface::MAX_MEMCARD_SLOT>
m_slot_memcard;
Common::EnumMap<QGroupBox*, ExpansionInterface::MAX_MEMCARD_SLOT> m_slot_group;
Common::EnumMap<QLineEdit*, ExpansionInterface::MAX_MEMCARD_SLOT> m_slot_file_edit;
Common::EnumMap<QPushButton*, ExpansionInterface::MAX_MEMCARD_SLOT> m_slot_open_button;
Common::EnumMap<QPushButton*, ExpansionInterface::MAX_MEMCARD_SLOT> m_slot_create_button;
Common::EnumMap<QTableWidget*, ExpansionInterface::MAX_MEMCARD_SLOT> m_slot_table;
Common::EnumMap<QLabel*, ExpansionInterface::MAX_MEMCARD_SLOT> m_slot_stat_label;
template <typename T>
using SlotEnumMap = Common::EnumMap<T, ExpansionInterface::MAX_MEMCARD_SLOT>;
SlotEnumMap<std::map<u8, IconAnimationData>> m_slot_active_icons;
SlotEnumMap<std::unique_ptr<Memcard::GCMemcard>> m_slot_memcard;
SlotEnumMap<QGroupBox*> m_slot_group;
SlotEnumMap<QLineEdit*> m_slot_file_edit;
SlotEnumMap<QPushButton*> m_slot_open_button;
SlotEnumMap<QPushButton*> m_slot_create_button;
SlotEnumMap<QTableWidget*> m_slot_table;
SlotEnumMap<QLabel*> m_slot_stat_label;
ExpansionInterface::Slot m_active_slot;
u64 m_current_frame = 0;