From 33d8585bdbe8c0bd96583b28da6301a390cde42d Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 22 Apr 2016 17:36:33 +0200 Subject: [PATCH] Change default ID name from {x} to _x_. * I think eyes are just more use to parsing legal identifier characters (like _s) rather than {}s syntax. It feels like it's probably more readable overall, although there's more of a risk of it blending into the names in the original code --- renderdoc/driver/shaders/spirv/spirv_disassemble.cpp | 2 +- renderdocui/Windows/ShaderViewer.cs | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/renderdoc/driver/shaders/spirv/spirv_disassemble.cpp b/renderdoc/driver/shaders/spirv/spirv_disassemble.cpp index 1edef668e..f2ad70bdc 100644 --- a/renderdoc/driver/shaders/spirv/spirv_disassemble.cpp +++ b/renderdoc/driver/shaders/spirv/spirv_disassemble.cpp @@ -299,7 +299,7 @@ static string OptionalFlagString(EnumType e) static string DefaultIDName(uint32_t ID) { - return StringFormat::Fmt("{%u}", ID); + return StringFormat::Fmt("_%u_", ID); } template diff --git a/renderdocui/Windows/ShaderViewer.cs b/renderdocui/Windows/ShaderViewer.cs index 3b2bc4b2b..254473f71 100644 --- a/renderdocui/Windows/ShaderViewer.cs +++ b/renderdocui/Windows/ShaderViewer.cs @@ -1034,11 +1034,6 @@ namespace renderdocui.Windows string pattern = "\\b" + word + "\\b"; - // if a number is selected, highlight the matching ID - uint dummy = 0; - if (uint.TryParse(word, out dummy)) - pattern = "\\{" + word + "\\}"; - var matches = Regex.Matches(scintilla1.Text, pattern); foreach (Match m in matches)