summaryrefslogtreecommitdiffstats
path: root/Source/cmExportFileGenerator.cxx
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2016-05-24 19:24:10 (GMT)
committerDaniel Pfeifer <daniel@pfeifer-mail.de>2016-05-24 21:22:24 (GMT)
commit5784747d1b0404a0c1cb0223b15b823476023fba (patch)
tree763d07bbde561ad1a2322328764b93b6c1852db2 /Source/cmExportFileGenerator.cxx
parent5cec953e6aafd4c132a7b6c0a929d95c1dee79ea (diff)
downloadCMake-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/cmExportFileGenerator.cxx')
-rw-r--r--Source/cmExportFileGenerator.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index 2d645da..736c7da 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -608,8 +608,8 @@ void cmExportFileGenerator::ResolveTargetsInGeneratorExpression(
while ((pos = input.find("$<TARGET_PROPERTY:", lastPos)) != input.npos) {
std::string::size_type nameStartPos =
pos + sizeof("$<TARGET_PROPERTY:") - 1;
- std::string::size_type closePos = input.find(">", nameStartPos);
- std::string::size_type commaPos = input.find(",", nameStartPos);
+ std::string::size_type closePos = input.find('>', nameStartPos);
+ std::string::size_type commaPos = input.find(',', nameStartPos);
std::string::size_type nextOpenPos = input.find("$<", nameStartPos);
if (commaPos == input.npos // Implied 'this' target
|| closePos == input.npos // Imcomplete expression.
@@ -634,7 +634,7 @@ void cmExportFileGenerator::ResolveTargetsInGeneratorExpression(
lastPos = pos;
while ((pos = input.find("$<TARGET_NAME:", lastPos)) != input.npos) {
std::string::size_type nameStartPos = pos + sizeof("$<TARGET_NAME:") - 1;
- std::string::size_type endPos = input.find(">", nameStartPos);
+ std::string::size_type endPos = input.find('>', nameStartPos);
if (endPos == input.npos) {
errorString = "$<TARGET_NAME:...> expression incomplete";
break;
@@ -659,7 +659,7 @@ void cmExportFileGenerator::ResolveTargetsInGeneratorExpression(
while (errorString.empty() &&
(pos = input.find("$<LINK_ONLY:", lastPos)) != input.npos) {
std::string::size_type nameStartPos = pos + sizeof("$<LINK_ONLY:") - 1;
- std::string::size_type endPos = input.find(">", nameStartPos);
+ std::string::size_type endPos = input.find('>', nameStartPos);
if (endPos == input.npos) {
errorString = "$<LINK_ONLY:...> expression incomplete";
break;