Skip to content

Commit

Permalink
Eliminate use-after-move (flutter#34197)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cbracken authored Jun 21, 2022
1 parent 98accbd commit 47988c1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions impeller/renderer/renderer_unittests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 47988c1

Please sign in to comment.