Make InstallOpExecutor take in unique_ptr
Test: th
Change-Id: Ic815eeff654d2943ac6339ae7c991e9e65fad87e
diff --git a/payload_consumer/partition_writer.cc b/payload_consumer/partition_writer.cc
index 75d738e..15996d4 100644
--- a/payload_consumer/partition_writer.cc
+++ b/payload_consumer/partition_writer.cc
@@ -223,8 +223,8 @@
"of this operation.";
auto writer = CreateBaseExtentWriter();
writer->Init(operation.dst_extents(), block_size_);
- return install_op_executor_.ExecuteZeroOrDiscardOperation(operation,
- writer.get());
+ return install_op_executor_.ExecuteZeroOrDiscardOperation(
+ operation, std::move(writer));
}
return true;
}
@@ -255,7 +255,7 @@
auto writer = CreateBaseExtentWriter();
writer->Init(optimized.dst_extents(), block_size_);
return install_op_executor_.ExecuteSourceCopyOperation(
- optimized, writer.get(), source_fd);
+ optimized, std::move(writer), source_fd);
}
bool PartitionWriter::PerformDiffOperation(const InstallOperation& operation,