Address range helper function for checking if a range contains an address

This commit is contained in:
Nav
2021-12-27 03:55:11 +00:00
parent c3db0eba65
commit bb306778cd

View File

@@ -36,6 +36,10 @@ namespace Bloom::Targets
|| (other.endAddress >= this->endAddress && other.startAddress <= this->endAddress)
;
}
[[nodiscard]] bool contains(std::uint32_t address) const {
return address >= this->startAddress && address < this->endAddress;
}
};
struct TargetMemoryDescriptor