Skip to content

Commit

Permalink
HotkeyManager: Move HotkeyGroupInfo struct into the cpp file
Browse files Browse the repository at this point in the history
This is only ever used internally. Also change the std::string name over
to a const char*, so that we don't need to potentially allocate anything
on the heap at immediate runtime.
  • Loading branch information
lioncash committed Jun 14, 2018
1 parent d459470 commit aae06f1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
9 changes: 8 additions & 1 deletion Source/Core/Core/HotkeyManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,14 @@ void Shutdown()
}
}

const std::array<HotkeyGroupInfo, NUM_HOTKEY_GROUPS> groups_info = {
struct HotkeyGroupInfo
{
const char* name;
Hotkey first;
Hotkey last;
};

constexpr std::array<HotkeyGroupInfo, NUM_HOTKEY_GROUPS> groups_info = {
{{_trans("General"), HK_OPEN, HK_EXIT},
{_trans("Volume"), HK_VOLUME_DOWN, HK_VOLUME_TOGGLE_MUTE},
{_trans("Emulation Speed"), HK_DECREASE_EMULATION_SPEED, HK_TOGGLE_THROTTLE},
Expand Down
7 changes: 0 additions & 7 deletions Source/Core/Core/HotkeyManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,6 @@ enum HotkeyGroup : int
NUM_HOTKEY_GROUPS,
};

struct HotkeyGroupInfo
{
std::string name;
Hotkey first;
Hotkey last;
};

struct HotkeyStatus
{
u32 button[NUM_HOTKEY_GROUPS];
Expand Down

0 comments on commit aae06f1

Please sign in to comment.