From 5919085e471a26d26dae5db7e29b7b3f6eadc3fc Mon Sep 17 00:00:00 2001 From: baldurk Date: Thu, 23 Jun 2022 11:10:22 +0100 Subject: [PATCH] Fix unused lambda capture compile warning --- .../shaders/spirv/spirv_debug_setup.cpp | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/renderdoc/driver/shaders/spirv/spirv_debug_setup.cpp b/renderdoc/driver/shaders/spirv/spirv_debug_setup.cpp index 245677fe0..6d4972682 100644 --- a/renderdoc/driver/shaders/spirv/spirv_debug_setup.cpp +++ b/renderdoc/driver/shaders/spirv/spirv_debug_setup.cpp @@ -1340,20 +1340,19 @@ void Debugger::ApplyDebugSourceVars(size_t startOffs, ThreadState &thread, Shade func = func->parent; rdcarray sorted = m_DebugInfo.activeLocalMappings; - std::sort(sorted.begin(), sorted.end(), - [this, &thread](const LocalMapping &a, const LocalMapping &b) { - size_t aStep = a.stepIndex; - size_t bStep = b.stepIndex; + std::sort(sorted.begin(), sorted.end(), [&thread](const LocalMapping &a, const LocalMapping &b) { + size_t aStep = a.stepIndex; + size_t bStep = b.stepIndex; - // declarations use the step index of the last write rather than the step index they - // were added - if(a.isDeclare && thread.lastWrite[a.debugVar] > 0) - aStep = thread.lastWrite[a.debugVar]; - if(b.isDeclare && thread.lastWrite[b.debugVar] > 0) - bStep = thread.lastWrite[b.debugVar]; + // declarations use the step index of the last write rather than the step index they + // were added + if(a.isDeclare && thread.lastWrite[a.debugVar] > 0) + aStep = thread.lastWrite[a.debugVar]; + if(b.isDeclare && thread.lastWrite[b.debugVar] > 0) + bStep = thread.lastWrite[b.debugVar]; - return aStep < bStep; - }); + return aStep < bStep; + }); for(const LocalMapping &mapping : sorted) {