[Mem] New handlers using if-range checks instead of switch

This commit is contained in:
irisz64
2025-07-24 15:49:13 +02:00
parent 3b5ed1a160
commit 741b9adfbf
3 changed files with 202 additions and 218 deletions

View File

@@ -17,6 +17,12 @@ static FORCE_INLINE std::vector<u8> IntegralToBuffer(const std::integral auto &v
return ret;
}
static FORCE_INLINE constexpr bool IsInsideRange(const std::integral auto& addr,
const std::integral auto& start,
const std::integral auto& end) {
return addr >= start && addr <= end;
}
template <typename T>
static constexpr FORCE_INLINE T ReadAccess(const u8 *data, const u32 index);
template <typename T>