summaryrefslogtreecommitdiffstats
path: root/Source/CursesDialog
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/CursesDialog
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/CursesDialog')
-rw-r--r--Source/CursesDialog/ccmake.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/CursesDialog/ccmake.cxx b/Source/CursesDialog/ccmake.cxx
index 01fce85..9a26db5 100644
--- a/Source/CursesDialog/ccmake.cxx
+++ b/Source/CursesDialog/ccmake.cxx
@@ -16,6 +16,7 @@
#include "cmDocumentation.h"
#include "cmDocumentationEntry.h" // IWYU pragma: keep
#include "cmState.h"
+#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
#include "cmake.h"
@@ -111,8 +112,8 @@ int main(int argc, char const* const* argv)
std::string cacheDir = cmSystemTools::GetCurrentWorkingDirectory();
for (i = 1; i < args.size(); ++i) {
- std::string arg = args[i];
- if (arg.find("-B", 0) == 0) {
+ std::string const& arg = args[i];
+ if (cmHasPrefix(arg, "-B")) {
cacheDir = arg.substr(2);
}
}