mirror of
https://github.com/azahar-emu/dynarmic
synced 2025-11-07 23:50:00 +01:00
a32_interface: std::move UserConfig where applicable
UserConfig instances contain up to 16 std::shared_ptr<Coprocessor> instances. We can std::move here to avoid performing 16 redundant atomic reference increment and decrement operations. Mostly inconsequential on x64, but we may as well signify intent.
This commit is contained in:
parent
b79ce71b0f
commit
6187de7ca7
@ -42,7 +42,7 @@ struct Jit::Impl {
|
|||||||
Impl(Jit* jit, A32::UserConfig config)
|
Impl(Jit* jit, A32::UserConfig config)
|
||||||
: block_of_code(GenRunCodeCallbacks(config.callbacks, &GetCurrentBlock, this), JitStateInfo{jit_state})
|
: block_of_code(GenRunCodeCallbacks(config.callbacks, &GetCurrentBlock, this), JitStateInfo{jit_state})
|
||||||
, emitter(block_of_code, config, jit)
|
, emitter(block_of_code, config, jit)
|
||||||
, config(config)
|
, config(std::move(config))
|
||||||
, jit_interface(jit)
|
, jit_interface(jit)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -142,7 +142,7 @@ private:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Jit::Jit(UserConfig config) : impl(std::make_unique<Impl>(this, config)) {}
|
Jit::Jit(UserConfig config) : impl(std::make_unique<Impl>(this, std::move(config))) {}
|
||||||
|
|
||||||
Jit::~Jit() = default;
|
Jit::~Jit() = default;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user