diff options
author | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2016-05-24 19:24:10 (GMT) |
---|---|---|
committer | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2016-05-24 21:22:24 (GMT) |
commit | 5784747d1b0404a0c1cb0223b15b823476023fba (patch) | |
tree | 763d07bbde561ad1a2322328764b93b6c1852db2 /Source/cmMakefileTargetGenerator.cxx | |
parent | 5cec953e6aafd4c132a7b6c0a929d95c1dee79ea (diff) | |
download | CMake-5784747d1b0404a0c1cb0223b15b823476023fba.zip CMake-5784747d1b0404a0c1cb0223b15b823476023fba.tar.gz CMake-5784747d1b0404a0c1cb0223b15b823476023fba.tar.bz2 |
Improve string find: prefer character overloads.
Apply fix-its from clang-tidy's performance-faster-string-find checker.
Ignore findings in kwsys.
Diffstat (limited to 'Source/cmMakefileTargetGenerator.cxx')
-rw-r--r-- | Source/cmMakefileTargetGenerator.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index e480140..c67170d 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -661,9 +661,9 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( if (do_preprocess_rules || do_assembly_rules) { std::vector<std::string> force_depends; force_depends.push_back("cmake_force"); - std::string::size_type dot_pos = relativeObj.rfind("."); + std::string::size_type dot_pos = relativeObj.rfind('.'); std::string relativeObjBase = relativeObj.substr(0, dot_pos); - dot_pos = obj.rfind("."); + dot_pos = obj.rfind('.'); std::string objBase = obj.substr(0, dot_pos); if (do_preprocess_rules) { @@ -1479,7 +1479,7 @@ void cmMakefileTargetGenerator::CreateLinkLibs( useResponseFile, useWatcomQuote); linkLibs = frameworkPath + linkPath + linkLibs; - if (useResponseFile && linkLibs.find_first_not_of(" ") != linkLibs.npos) { + if (useResponseFile && linkLibs.find_first_not_of(' ') != linkLibs.npos) { // Lookup the response file reference flag. std::string responseFlagVar = "CMAKE_"; responseFlagVar += |