diff options
author | bd <bdunahu@operationnull.com> | 2025-04-14 23:40:25 -0400 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2025-04-14 23:40:25 -0400 |
commit | a7620015acc2401165b4587cbb6c9a118d944493 (patch) | |
tree | 5bbe698fe42a7d32578df6170e464508a78a8e50 /src/cache.cc | |
parent | 2140a23041d3920e001457f2c2acb0853094963d (diff) |
Add preprocess method to storage, removing nearly all duplication
Diffstat (limited to 'src/cache.cc')
-rw-r--r-- | src/cache.cc | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/cache.cc b/src/cache.cc index ee4b00c..68047ed 100644 --- a/src/cache.cc +++ b/src/cache.cc @@ -58,13 +58,7 @@ Cache::read_word(void *id, int address, signed int &data) int Cache::process(void *id, int address, std::function<void(int index, int offset)> request_handler) { - if (id == nullptr) - throw std::invalid_argument("Accessor cannot be nullptr."); - - if (this->current_request == nullptr) - this->current_request = id; - - if (this->current_request != id) + if (!preprocess(id)) return 0; if (is_address_missing(address)) |