mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-21 14:40:26 -06:00
clang-tidy: apply performance-faster-string-find fixes
This commit is contained in:
committed by
Brad King
parent
7c9db8f813
commit
cac529dd49
@@ -72,7 +72,7 @@ std::string cmFindPathCommand::FindHeaderInFramework(std::string const& file,
|
||||
{
|
||||
std::string fileName = file;
|
||||
std::string frameWorkName;
|
||||
std::string::size_type pos = fileName.find("/");
|
||||
std::string::size_type pos = fileName.find('/');
|
||||
// if there is a / in the name try to find the header as a framework
|
||||
// For example bar/foo.h would look for:
|
||||
// bar.framework/Headers/foo.h
|
||||
@@ -83,7 +83,7 @@ std::string cmFindPathCommand::FindHeaderInFramework(std::string const& file,
|
||||
frameWorkName =
|
||||
frameWorkName.substr(0, frameWorkName.size() - fileName.size() - 1);
|
||||
// if the framework has a path in it then just use the filename
|
||||
if (frameWorkName.find("/") != frameWorkName.npos) {
|
||||
if (frameWorkName.find('/') != frameWorkName.npos) {
|
||||
fileName = file;
|
||||
frameWorkName = "";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user