mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-21 08:27:53 -05:00
Pica/Regs: Use binary search to look up reg names
This gets rid of the static unordered_map. Also changes the return type const char*, avoiding unnecessary allocations (the result was only used by calling .c_str() on it.)
This commit is contained in:
@ -64,8 +64,8 @@ struct Regs {
|
||||
std::array<u32, NUM_REGS> reg_array;
|
||||
};
|
||||
|
||||
// Map register indices to names readable by humans
|
||||
static std::string GetCommandName(int index);
|
||||
/// Map register indices to names readable by humans
|
||||
static const char* GetRegisterName(u16 index);
|
||||
};
|
||||
|
||||
static_assert(sizeof(Regs) == Regs::NUM_REGS * sizeof(u32), "Regs struct has wrong size");
|
||||
|
Reference in New Issue
Block a user