[lldb][NFC] Apply performance-faster-string-find (str.find("X") -> str.find('x'))

This commit is contained in:
Jordan Rupprecht 2020-12-16 10:53:18 -08:00
parent 70bd75426e
commit 869f8363c4
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -1027,7 +1027,7 @@ CreateRunInTerminalReverseRequest(const llvm::json::Object &launch_request) {
std::vector<std::string> 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",