From aab637c9e725b532bbb0ea60a58a8a37de9a52d0 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Thu, 1 Jun 2017 18:28:34 -0400 Subject: [PATCH] Made check_address_for_trap inlineable. --- Processors/AllRAMProcessor.cpp | 6 ------ Processors/AllRAMProcessor.hpp | 6 +++++- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Processors/AllRAMProcessor.cpp b/Processors/AllRAMProcessor.cpp index c91aa57de..2bf62bcca 100644 --- a/Processors/AllRAMProcessor.cpp +++ b/Processors/AllRAMProcessor.cpp @@ -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; } diff --git a/Processors/AllRAMProcessor.hpp b/Processors/AllRAMProcessor.hpp index 7fcfe3f65..754f9327f 100644 --- a/Processors/AllRAMProcessor.hpp +++ b/Processors/AllRAMProcessor.hpp @@ -33,7 +33,11 @@ class AllRAMProcessor { std::vector 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 trap_addresses_;