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
9100696696
commit
268d08511e
@ -42,7 +42,7 @@ struct Jit::Impl {
|
||||
Impl(Jit* jit, A32::UserConfig config)
|
||||
: block_of_code(GenRunCodeCallbacks(config.callbacks, &GetCurrentBlock, this), JitStateInfo{jit_state})
|
||||
, emitter(block_of_code, config, jit)
|
||||
, config(config)
|
||||
, config(std::move(config))
|
||||
, 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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user