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:
Lioncash 2019-05-23 22:08:25 -04:00 committed by MerryMage
parent b79ce71b0f
commit 6187de7ca7

View file

@ -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;