From f9a43b982d1e59213b313e0e5705bbf74818f621 Mon Sep 17 00:00:00 2001 From: dan sinclair Date: Sun, 24 Jul 2022 19:45:17 +0000 Subject: [PATCH] Remove unused string. We saved the string in the lexer try_float for use in error messages, then changed the message to not show the string. This CL removes the creation of the float string. Change-Id: I9bb381bebe31f25609c66d5ccda91de0277199cc Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97069 Commit-Queue: Dan Sinclair Auto-Submit: Dan Sinclair Commit-Queue: Ben Clayton Reviewed-by: Ben Clayton Kokoro: Kokoro --- src/tint/reader/wgsl/lexer.cc | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/tint/reader/wgsl/lexer.cc b/src/tint/reader/wgsl/lexer.cc index 22eedda1ed..93392b6e55 100644 --- a/src/tint/reader/wgsl/lexer.cc +++ b/src/tint/reader/wgsl/lexer.cc @@ -357,9 +357,6 @@ Token Lexer::try_float() { return {}; } - // Save the error string, for use by diagnostics. - const auto str = std::string{substr(start, end - start)}; - advance(end - start); end_source(source);