From 869f8363c424592e5f8c258492f46d5fcbc90c83 Mon Sep 17 00:00:00 2001 From: Jordan Rupprecht Date: Wed, 16 Dec 2020 10:53:18 -0800 Subject: [PATCH] [lldb][NFC] Apply performance-faster-string-find (`str.find("X")` -> `str.find('x')`) --- .../InstrumentationRuntimeMainThreadChecker.cpp | 2 +- lldb/tools/lldb-vscode/JSONUtils.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lldb/source/Plugins/InstrumentationRuntime/MainThreadChecker/InstrumentationRuntimeMainThreadChecker.cpp b/lldb/source/Plugins/InstrumentationRuntime/MainThreadChecker/InstrumentationRuntimeMainThreadChecker.cpp index 72d28c347457..99784bd3dbd1 100644 --- a/lldb/source/Plugins/InstrumentationRuntime/MainThreadChecker/InstrumentationRuntimeMainThreadChecker.cpp +++ b/lldb/source/Plugins/InstrumentationRuntime/MainThreadChecker/InstrumentationRuntimeMainThreadChecker.cpp @@ -114,7 +114,7 @@ InstrumentationRuntimeMainThreadChecker::RetrieveReportData( std::string className = ""; std::string selector = ""; if (apiName.substr(0, 2) == "-[") { - size_t spacePos = apiName.find(" "); + size_t spacePos = apiName.find(' '); if (spacePos != std::string::npos) { className = apiName.substr(2, spacePos - 2); selector = apiName.substr(spacePos + 1, apiName.length() - spacePos - 2); diff --git a/lldb/tools/lldb-vscode/JSONUtils.cpp b/lldb/tools/lldb-vscode/JSONUtils.cpp index 044bfd13ec46..831f3285d31f 100644 --- a/lldb/tools/lldb-vscode/JSONUtils.cpp +++ b/lldb/tools/lldb-vscode/JSONUtils.cpp @@ -1027,7 +1027,7 @@ CreateRunInTerminalReverseRequest(const llvm::json::Object &launch_request) { std::vector envs = GetStrings(launch_request_arguments, "env"); llvm::json::Object environment; for (const std::string &env : envs) { - size_t index = env.find("="); + size_t index = env.find('='); environment.try_emplace(env.substr(0, index), env.substr(index + 1)); } run_in_terminal_args.try_emplace("env",