1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-25 16:31:42 +00:00

Made check_address_for_trap inlineable.

This commit is contained in:
Thomas Harte 2017-06-01 18:28:34 -04:00
parent 7d9b197383
commit aab637c9e7
2 changed files with 5 additions and 7 deletions

View File

@ -28,12 +28,6 @@ uint32_t AllRAMProcessor::get_timestamp() {
return timestamp_;
}
void AllRAMProcessor::check_address_for_trap(uint16_t address) {
if(trap_addresses_.find(address) != trap_addresses_.end()) {
trap_handler_->processor_did_trap(*this, address);
}
}
void AllRAMProcessor::set_trap_handler(TrapHandler *trap_handler) {
trap_handler_ = trap_handler;
}

View File

@ -33,7 +33,11 @@ class AllRAMProcessor {
std::vector<uint8_t> memory_;
uint32_t timestamp_;
void check_address_for_trap(uint16_t address);
inline void check_address_for_trap(uint16_t address) {
if(trap_addresses_.find(address) != trap_addresses_.end()) {
trap_handler_->processor_did_trap(*this, address);
}
}
private:
std::set<uint16_t> trap_addresses_;