frontend/ir/type: Generify std::array declaration
With deduction guides, we can eliminate the need to explicitly size the array. Also newlines the elements based off their relation, making it slightly nicer to read.
This commit is contained in:
parent
f01dc9192a
commit
e4c65721fe
1 changed files with 10 additions and 1 deletions
|
@ -16,7 +16,16 @@
|
|||
namespace Dynarmic::IR {
|
||||
|
||||
std::string GetNameOf(Type type) {
|
||||
static const std::array<const char*, 15> names{"A32Reg", "A32ExtReg", "A64Reg", "A64Vec", "Opaque", "U1", "U8", "U16", "U32", "U64", "U128", "CoprocInfo", "NZCVFlags", "Cond", "Table"};
|
||||
static constexpr std::array names{
|
||||
"A32Reg", "A32ExtReg",
|
||||
"A64Reg", "A64Vec",
|
||||
"Opaque",
|
||||
"U1", "U8", "U16", "U32", "U64", "U128",
|
||||
"CoprocInfo",
|
||||
"NZCVFlags",
|
||||
"Cond",
|
||||
"Table"
|
||||
};
|
||||
|
||||
const size_t bits = static_cast<size_t>(type);
|
||||
if (bits == 0) {
|
||||
|
|
Loading…
Reference in a new issue