mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-01-10 08:28:07 +01:00
arm_types: Specialize std::hash for LocationDescriptor (#14)
Same thing, but with the benefit of working with anything that uses std::hash by default.
This commit is contained in:
parent
8c4df46580
commit
05b189bc26
2 changed files with 12 additions and 9 deletions
|
|
@ -137,12 +137,6 @@ private:
|
|||
Arm::FPSCR fpscr; ///< Floating point status control register.
|
||||
};
|
||||
|
||||
struct LocationDescriptorHash {
|
||||
size_t operator()(const LocationDescriptor& x) const {
|
||||
return std::hash<u64>()(x.UniqueHash());
|
||||
}
|
||||
};
|
||||
|
||||
const char* CondToString(Cond cond, bool explicit_al = false);
|
||||
const char* RegToString(Reg reg);
|
||||
const char* ExtRegToString(ExtReg reg);
|
||||
|
|
@ -183,3 +177,12 @@ inline ExtReg operator+(ExtReg reg, size_t number) {
|
|||
|
||||
} // namespace Arm
|
||||
} // namespace Dynarmic
|
||||
|
||||
namespace std {
|
||||
template <>
|
||||
struct hash<Dynarmic::Arm::LocationDescriptor> {
|
||||
size_t operator()(const Dynarmic::Arm::LocationDescriptor& x) const {
|
||||
return std::hash<u64>()(x.UniqueHash());
|
||||
}
|
||||
};
|
||||
} // namespace std
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue