summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio10Generator.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/cmGlobalVisualStudio10Generator.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/cmGlobalVisualStudio10Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio10Generator.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index ccb6c50..5166de6 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -19,6 +19,7 @@
#include "cmMakefile.h"
#include "cmMessageType.h"
#include "cmSourceFile.h"
+#include "cmStringAlgorithms.h"
#include "cmVersion.h"
#include "cmVisualStudioSlnData.h"
#include "cmVisualStudioSlnParser.h"
@@ -313,7 +314,7 @@ bool cmGlobalVisualStudio10Generator::SetGeneratorToolset(
version.clear();
}
- if (version.find(this->GetPlatformToolsetString()) != 0) {
+ if (!cmHasPrefix(version, this->GetPlatformToolsetString())) {
std::ostringstream e;
/* clang-format off */
e <<