mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-03 21:00:01 -05:00
clang-tidy: apply performance-faster-string-find fixes
This commit is contained in:
committed by
Brad King
parent
7c9db8f813
commit
cac529dd49
@@ -342,7 +342,7 @@ bool cmStringCommand::RegexReplace(std::vector<std::string> const& args)
|
||||
std::vector<RegexReplacement> replacement;
|
||||
std::string::size_type l = 0;
|
||||
while (l < replace.length()) {
|
||||
std::string::size_type r = replace.find("\\", l);
|
||||
std::string::size_type r = replace.find('\\', l);
|
||||
if (r == std::string::npos) {
|
||||
r = replace.length();
|
||||
replacement.push_back(replace.substr(l, r - l));
|
||||
|
||||
Reference in New Issue
Block a user