Fix detected use after move

This commit is contained in:
Bart Louwers
2023-10-03 12:14:55 +00:00
parent 86675fbf38
commit 82feff83da

View File

@@ -608,6 +608,7 @@ void RenderFillLayer::update(gfx::ShaderRegistry& shaders,
fillBuilder->setShader(fillShader);
if (outlineBuilder) {
fillBuilder->setVertexAttributes(vertexAttrs);
outlineBuilder->setVertexAttributes(std::move(vertexAttrs));
} else {
fillBuilder->setVertexAttributes(std::move(vertexAttrs));
}
@@ -620,7 +621,6 @@ void RenderFillLayer::update(gfx::ShaderRegistry& shaders,
}
if (outlineBuilder && bucket.sharedLines->elements()) {
outlineBuilder->setShader(outlineShader);
outlineBuilder->setVertexAttributes(std::move(vertexAttrs));
outlineBuilder->setRawVertices({}, vertexCount, gfx::AttributeDataType::Short2);
outlineBuilder->setSegments(
gfx::Lines(2), bucket.sharedLines, bucket.lineSegments.data(), bucket.lineSegments.size());