Added size() member function to TargeMemoryAddressRange

This commit is contained in:
Nav
2024-03-16 16:21:39 +00:00
parent 95dd0e0119
commit 4675d1fddc

View File

@@ -46,6 +46,10 @@ namespace Targets
return this->startAddress < rhs.startAddress;
}
TargetMemorySize size() const {
return this->endAddress - this->startAddress + 1;
}
[[nodiscard]] bool intersectsWith(const TargetMemoryAddressRange& other) const {
return
(other.startAddress <= this->startAddress && other.endAddress >= this->startAddress)