frontend/A64/types: Make RegNumber() and VecNumber() constexpr
Given they simply perform casting, they can be safely made constexpr.
This commit is contained in:
parent
0c43228ad5
commit
796bb8a7f7
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue