Eliminate use-after-move (flutter/engine#34197)

pipeline_desc is a std::optional<PipelineDescriptor>. It's used in test
expectations after (lines 320-321) the move. This passes by value like
in other tests.
This commit is contained in:
Chris Bracken
2022-06-21 19:51:58 +01:00
committed by GitHub
parent f9a694e833
commit ba49690c20

View File

@@ -285,9 +285,8 @@ TEST_P(RendererTest, CanRenderToTexture) {
auto pipeline_desc =
BoxPipelineBuilder::MakeDefaultPipelineDescriptor(*context);
ASSERT_TRUE(pipeline_desc.has_value());
auto box_pipeline = context->GetPipelineLibrary()
->GetRenderPipeline(std::move(pipeline_desc))
.get();
auto box_pipeline =
context->GetPipelineLibrary()->GetRenderPipeline(pipeline_desc).get();
ASSERT_TRUE(box_pipeline);
VertexBufferBuilder<VS::PerVertexData> vertex_builder;