mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-19 19:53:56 +00:00
Merge remote-tracking branch 'origin/main' into wow64
This commit is contained in:
@@ -173,6 +173,7 @@ class module_manager
|
||||
callbacks* callbacks_{};
|
||||
|
||||
module_map modules_{};
|
||||
mutable module_map::iterator last_module_cache_{modules_.end()};
|
||||
|
||||
// Strategy pattern components
|
||||
mapping_strategy_factory strategy_factory_;
|
||||
@@ -198,6 +199,11 @@ class module_manager
|
||||
|
||||
module_map::iterator get_module(const uint64_t address)
|
||||
{
|
||||
if (last_module_cache_ != this->modules_.end() && last_module_cache_->second.contains(address))
|
||||
{
|
||||
return last_module_cache_;
|
||||
}
|
||||
|
||||
if (this->modules_.empty())
|
||||
{
|
||||
return this->modules_.end();
|
||||
@@ -213,6 +219,7 @@ class module_manager
|
||||
|
||||
if (upper_bound->second.contains(address))
|
||||
{
|
||||
last_module_cache_ = upper_bound;
|
||||
return upper_bound;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user