[core] Fix bugprone-move-forwarding-reference errors
As reported by clang-tidy-8.
This commit is contained in:
@@ -23,9 +23,8 @@ void ShapeAnnotationImpl::updateTileData(const CanonicalTileID& tileID, Annotati
|
||||
|
||||
if (!shapeTiler) {
|
||||
mapbox::feature::feature_collection<double> features;
|
||||
features.emplace_back(ShapeAnnotationGeometry::visit(geometry(), [] (auto&& geom) {
|
||||
return Feature { std::move(geom) };
|
||||
}));
|
||||
features.emplace_back(ShapeAnnotationGeometry::visit(
|
||||
geometry(), [](auto&& geom) { return Feature{std::forward<decltype(geom)>(geom)}; }));
|
||||
mapbox::geojsonvt::Options options;
|
||||
// The annotation source is currently hard coded to maxzoom 16, so we're topping out at z16
|
||||
// here as well.
|
||||
|
||||
@@ -68,12 +68,11 @@ void RenderBackgroundLayer::render(PaintParameters& parameters) {
|
||||
const BackgroundProgram::Binders paintAttributeData(properties, 0);
|
||||
|
||||
auto draw = [&](auto& program, auto&& uniformValues, const auto& textureBindings, const uint32_t id) {
|
||||
const auto allUniformValues = program.computeAllUniformValues(
|
||||
std::move(uniformValues),
|
||||
paintAttributeData,
|
||||
properties,
|
||||
parameters.state.getZoom()
|
||||
);
|
||||
const auto allUniformValues =
|
||||
program.computeAllUniformValues(std::forward<decltype(uniformValues)>(uniformValues),
|
||||
paintAttributeData,
|
||||
properties,
|
||||
parameters.state.getZoom());
|
||||
const auto allAttributeBindings = program.computeAllAttributeBindings(
|
||||
*parameters.staticData.tileVertexBuffer,
|
||||
paintAttributeData,
|
||||
|
||||
@@ -113,21 +113,19 @@ void RenderFillLayer::render(PaintParameters& parameters) {
|
||||
|
||||
checkRenderability(parameters, programInstance.activeBindingCount(allAttributeBindings));
|
||||
|
||||
programInstance.draw(
|
||||
parameters.context,
|
||||
*parameters.renderPass,
|
||||
drawMode,
|
||||
depthMode,
|
||||
parameters.stencilModeForClipping(tile.id),
|
||||
parameters.colorModeForRenderPass(),
|
||||
gfx::CullFaceMode::disabled(),
|
||||
indexBuffer,
|
||||
segments,
|
||||
allUniformValues,
|
||||
allAttributeBindings,
|
||||
std::move(textureBindings),
|
||||
getID()
|
||||
);
|
||||
programInstance.draw(parameters.context,
|
||||
*parameters.renderPass,
|
||||
drawMode,
|
||||
depthMode,
|
||||
parameters.stencilModeForClipping(tile.id),
|
||||
parameters.colorModeForRenderPass(),
|
||||
gfx::CullFaceMode::disabled(),
|
||||
indexBuffer,
|
||||
segments,
|
||||
allUniformValues,
|
||||
allAttributeBindings,
|
||||
std::forward<decltype(textureBindings)>(textureBindings),
|
||||
getID());
|
||||
};
|
||||
|
||||
auto fillRenderPass = (evaluated.get<FillColor>().constantOr(Color()).a >= 1.0f
|
||||
@@ -208,21 +206,19 @@ void RenderFillLayer::render(PaintParameters& parameters) {
|
||||
|
||||
checkRenderability(parameters, programInstance.activeBindingCount(allAttributeBindings));
|
||||
|
||||
programInstance.draw(
|
||||
parameters.context,
|
||||
*parameters.renderPass,
|
||||
drawMode,
|
||||
depthMode,
|
||||
parameters.stencilModeForClipping(tile.id),
|
||||
parameters.colorModeForRenderPass(),
|
||||
gfx::CullFaceMode::disabled(),
|
||||
indexBuffer,
|
||||
segments,
|
||||
allUniformValues,
|
||||
allAttributeBindings,
|
||||
std::move(textureBindings),
|
||||
getID()
|
||||
);
|
||||
programInstance.draw(parameters.context,
|
||||
*parameters.renderPass,
|
||||
drawMode,
|
||||
depthMode,
|
||||
parameters.stencilModeForClipping(tile.id),
|
||||
parameters.colorModeForRenderPass(),
|
||||
gfx::CullFaceMode::disabled(),
|
||||
indexBuffer,
|
||||
segments,
|
||||
allUniformValues,
|
||||
allAttributeBindings,
|
||||
std::forward<decltype(textureBindings)>(textureBindings),
|
||||
getID());
|
||||
};
|
||||
|
||||
if (bucket.triangleIndexBuffer) {
|
||||
|
||||
@@ -114,12 +114,11 @@ void RenderLineLayer::render(PaintParameters& parameters) {
|
||||
|
||||
paintPropertyBinders.setPatternParameters(patternPositionA, patternPositionB, crossfade);
|
||||
|
||||
const auto allUniformValues = programInstance.computeAllUniformValues(
|
||||
std::move(uniformValues),
|
||||
paintPropertyBinders,
|
||||
evaluated,
|
||||
parameters.state.getZoom()
|
||||
);
|
||||
const auto allUniformValues =
|
||||
programInstance.computeAllUniformValues(std::forward<decltype(uniformValues)>(uniformValues),
|
||||
paintPropertyBinders,
|
||||
evaluated,
|
||||
parameters.state.getZoom());
|
||||
const auto allAttributeBindings = programInstance.computeAllAttributeBindings(
|
||||
*bucket.vertexBuffer,
|
||||
paintPropertyBinders,
|
||||
@@ -128,21 +127,19 @@ void RenderLineLayer::render(PaintParameters& parameters) {
|
||||
|
||||
checkRenderability(parameters, programInstance.activeBindingCount(allAttributeBindings));
|
||||
|
||||
programInstance.draw(
|
||||
parameters.context,
|
||||
*parameters.renderPass,
|
||||
gfx::Triangles(),
|
||||
parameters.depthModeForSublayer(0, gfx::DepthMaskType::ReadOnly),
|
||||
parameters.stencilModeForClipping(tile.id),
|
||||
parameters.colorModeForRenderPass(),
|
||||
gfx::CullFaceMode::disabled(),
|
||||
*bucket.indexBuffer,
|
||||
bucket.segments,
|
||||
allUniformValues,
|
||||
allAttributeBindings,
|
||||
std::move(textureBindings),
|
||||
getID()
|
||||
);
|
||||
programInstance.draw(parameters.context,
|
||||
*parameters.renderPass,
|
||||
gfx::Triangles(),
|
||||
parameters.depthModeForSublayer(0, gfx::DepthMaskType::ReadOnly),
|
||||
parameters.stencilModeForClipping(tile.id),
|
||||
parameters.colorModeForRenderPass(),
|
||||
gfx::CullFaceMode::disabled(),
|
||||
*bucket.indexBuffer,
|
||||
bucket.segments,
|
||||
allUniformValues,
|
||||
allAttributeBindings,
|
||||
std::forward<decltype(textureBindings)>(textureBindings),
|
||||
getID());
|
||||
};
|
||||
|
||||
if (!evaluated.get<LineDasharray>().from.empty()) {
|
||||
|
||||
Reference in New Issue
Block a user