Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 47988c1

Browse files
authored
Eliminate use-after-move (#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.
1 parent 98accbd commit 47988c1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

impeller/renderer/renderer_unittests.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,8 @@ TEST_P(RendererTest, CanRenderToTexture) {
285285
auto pipeline_desc =
286286
BoxPipelineBuilder::MakeDefaultPipelineDescriptor(*context);
287287
ASSERT_TRUE(pipeline_desc.has_value());
288-
auto box_pipeline = context->GetPipelineLibrary()
289-
->GetRenderPipeline(std::move(pipeline_desc))
290-
.get();
288+
auto box_pipeline =
289+
context->GetPipelineLibrary()->GetRenderPipeline(pipeline_desc).get();
291290
ASSERT_TRUE(box_pipeline);
292291

293292
VertexBufferBuilder<VS::PerVertexData> vertex_builder;

0 commit comments

Comments
 (0)