frontend/A64/types: Make RegNumber() and VecNumber() constexpr

Given they simply perform casting, they can be safely made constexpr.
This commit is contained in:
Lioncash 2019-05-02 00:00:13 -04:00 committed by MerryMage
parent 0c43228ad5
commit 796bb8a7f7

View file

@ -48,11 +48,11 @@ std::string VecToString(Vec vec);
std::ostream& operator<<(std::ostream& o, Reg reg);
std::ostream& operator<<(std::ostream& o, Vec vec);
inline size_t RegNumber(Reg reg) {
constexpr size_t RegNumber(Reg reg) {
return static_cast<size_t>(reg);
}
inline size_t VecNumber(Vec vec) {
constexpr size_t VecNumber(Vec vec) {
return static_cast<size_t>(vec);
}