Commit 03f7ce40 authored by Florian Sattler's avatar Florian Sattler Committed by Commit Bot

[cleanup] Remove unnecessary copies from general classes.

Fixing clang-tidy warning.

Bug: v8:8015
Change-Id: I829fe79b95a0275ccc94e32fea2cdc74affef714
Reviewed-on: https://chromium-review.googlesource.com/1228066Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
Commit-Queue: Florian Sattler <sattlerf@google.com>
Cr-Commit-Position: refs/heads/master@{#56050}
parent ba463e55
......@@ -299,7 +299,9 @@ class CodeStubDescriptor {
DCHECK(!stack_parameter_count_.is_valid());
}
void set_call_descriptor(CallInterfaceDescriptor d) { call_descriptor_ = d; }
void set_call_descriptor(CallInterfaceDescriptor d) {
call_descriptor_ = std::move(d);
}
CallInterfaceDescriptor call_descriptor() const { return call_descriptor_; }
int GetRegisterParameterCount() const {
......
......@@ -83,7 +83,7 @@ class BuiltinDeserializerAllocator final {
// Builtin deserialization does not bake reservations into the snapshot, hence
// this is a nop.
void DecodeReservation(std::vector<SerializedData::Reservation> res) {}
void DecodeReservation(const std::vector<SerializedData::Reservation>& res) {}
// These methods are used to pre-allocate builtin objects prior to
// deserialization.
......
......@@ -2472,7 +2472,7 @@ class AsyncCompileJob::PrepareAndStartCompile : public CompileStep {
public:
PrepareAndStartCompile(std::shared_ptr<const WasmModule> module,
bool start_compilation)
: module_(module), start_compilation_(start_compilation) {}
: module_(std::move(module)), start_compilation_(start_compilation) {}
private:
std::shared_ptr<const WasmModule> module_;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment