mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-27 01:31:42 +00:00
Made check_address_for_trap inlineable.
This commit is contained in:
parent
7d9b197383
commit
aab637c9e7
@ -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;
|
||||
}
|
||||
|
@ -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_;
|
||||
|
Loading…
Reference in New Issue
Block a user