summaryrefslogtreecommitdiffstats
path: root/Source/cmJsonObjects.cxx
diff options
context:
space:
mode:
authorRolf Eike Beer <eike@sf-mail.de>2020-03-20 17:05:24 (GMT)
committerRolf Eike Beer <eike@sf-mail.de>2020-03-23 21:41:43 (GMT)
commit48adc297211181a97fab75ef0260fda5147c1195 (patch)
tree17f278522ccaff4b03bc1eb81cb5177fd42d0f37 /Source/cmJsonObjects.cxx
parentbfb69f9543bfa7f9f3c9488bf7e740f21896cec4 (diff)
downloadCMake-48adc297211181a97fab75ef0260fda5147c1195.zip
CMake-48adc297211181a97fab75ef0260fda5147c1195.tar.gz
CMake-48adc297211181a97fab75ef0260fda5147c1195.tar.bz2
replace "std::string::find(x) == 0" with cmHasPrefix()
Diffstat (limited to 'Source/cmJsonObjects.cxx')
-rw-r--r--Source/cmJsonObjects.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmJsonObjects.cxx b/Source/cmJsonObjects.cxx
index dd36386..9ecf378 100644
--- a/Source/cmJsonObjects.cxx
+++ b/Source/cmJsonObjects.cxx
@@ -90,7 +90,8 @@ void cmGetCMakeInputs(const cmGlobalGenerator* gg,
const std::string startOfFile = lf.substr(0, cmakeRootDir.size());
const bool isInternal = (startOfFile == cmakeRootDir);
- const bool isTemporary = !isInternal && (lf.find(buildDir + '/') == 0);
+ const bool isTemporary =
+ !isInternal && (cmHasPrefix(lf, buildDir + '/'));
std::string toAdd = lf;
if (!sourceDir.empty()) {