From 5eaac6c03fbc7fefcea77676501b4124f0864c21 Mon Sep 17 00:00:00 2001 From: baldurk Date: Mon, 8 Sep 2025 13:33:03 +0100 Subject: [PATCH] Remove unnecessary old code * this code is from before there was a separate section for OpModuleProcessed, so it is now redundant and can always use the end iterator of the names section. --- renderdoc/driver/shaders/spirv/spirv_editor.cpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/renderdoc/driver/shaders/spirv/spirv_editor.cpp b/renderdoc/driver/shaders/spirv/spirv_editor.cpp index b24b15309..93be5e7ce 100644 --- a/renderdoc/driver/shaders/spirv/spirv_editor.cpp +++ b/renderdoc/driver/shaders/spirv/spirv_editor.cpp @@ -263,17 +263,7 @@ void Editor::SetName(Id id, const rdcstr &name) { Operation op = OpName(id, name); - Iter it; - - // OpName/OpMemberName must be before OpModuleProcessed. - for(it = Begin(Section::DebugNames); it < End(Section::DebugNames); ++it) - { - if(it.opcode() == Op::ModuleProcessed) - break; - } - - if(End(Section::DebugNames) < it) - it = End(Section::DebugNames); + Iter it = End(Section::DebugNames); InsertOperation(op, it.offs()); }