reduce lambda copies

This commit is contained in:
Sam Gondelman 2019-03-21 08:36:32 -07:00 committed by GitHub
parent 7a5bbb8f6f
commit 61b7b8b669
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -167,14 +167,16 @@ void PolyLineEntityRenderer::doRenderUpdateSynchronousTyped(const ScenePointer&
bool uvModeStretchChanged = _isUVModeStretch != isUVModeStretch; bool uvModeStretchChanged = _isUVModeStretch != isUVModeStretch;
_isUVModeStretch = isUVModeStretch; _isUVModeStretch = isUVModeStretch;
bool geometryChanged = uvModeStretchChanged || pointsChanged || widthsChanged || normalsChanged || colorsChanged || textureChanged || faceCameraChanged;
void* key = (void*)this; void* key = (void*)this;
AbstractViewStateInterface::instance()->pushPostUpdateLambda(key, [=]() { AbstractViewStateInterface::instance()->pushPostUpdateLambda(key, [this, geometryChanged] () {
withWriteLock([&] { withWriteLock([&] {
updateModelTransformAndBound(); updateModelTransformAndBound();
_renderTransform = getModelTransform(); _renderTransform = getModelTransform();
if (uvModeStretchChanged || pointsChanged || widthsChanged || normalsChanged || colorsChanged || textureChanged || faceCameraChanged) { if (geometryChanged) {
updateGeometry(); updateGeometry();
} }
}); });