From e4c65721fed291a2c14e9edb4566549bcaa1fff2 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 2 May 2019 09:08:21 -0400 Subject: [PATCH] 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. --- src/frontend/ir/type.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/frontend/ir/type.cpp b/src/frontend/ir/type.cpp index f1ac93e5..720f7d19 100644 --- a/src/frontend/ir/type.cpp +++ b/src/frontend/ir/type.cpp @@ -16,7 +16,16 @@ namespace Dynarmic::IR { std::string GetNameOf(Type type) { - static const std::array 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(type); if (bits == 0) {