yuzu-emu
/
yuzu-mainline
Archived
1
0
Fork 0

arm_dynarmic: Correct initializer list order

Amends the initializer list to be in the same order that each variable
would be initialized in. We also do this to ensure we don't use a bogus
uninitialized instance of the exclusive monitor within MakeJit()

We can also remove the jit member from the initializer list as this is
initialized by PageTableChanged()
This commit is contained in:
Lioncash 2018-07-30 23:46:07 -04:00
parent bf9c62bc76
commit 444a01afa6
1 changed files with 3 additions and 5 deletions

View File

@ -139,14 +139,12 @@ void ARM_Dynarmic::Step() {
} }
ARM_Dynarmic::ARM_Dynarmic(std::shared_ptr<ExclusiveMonitor> exclusive_monitor, size_t core_index) ARM_Dynarmic::ARM_Dynarmic(std::shared_ptr<ExclusiveMonitor> exclusive_monitor, size_t core_index)
: cb(std::make_unique<ARM_Dynarmic_Callbacks>(*this)), : cb(std::make_unique<ARM_Dynarmic_Callbacks>(*this)), core_index{core_index},
jit(MakeJit()), exclusive_monitor{std::dynamic_pointer_cast<DynarmicExclusiveMonitor>( exclusive_monitor{std::dynamic_pointer_cast<DynarmicExclusiveMonitor>(exclusive_monitor)} {
exclusive_monitor)},
core_index{core_index} {
ARM_Interface::ThreadContext ctx; ARM_Interface::ThreadContext ctx;
inner_unicorn.SaveContext(ctx); inner_unicorn.SaveContext(ctx);
LoadContext(ctx);
PageTableChanged(); PageTableChanged();
LoadContext(ctx);
} }
ARM_Dynarmic::~ARM_Dynarmic() = default; ARM_Dynarmic::~ARM_Dynarmic() = default;