summaryrefslogtreecommitdiffstats
path: root/Source/cmVSSetupHelper.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2022-11-22 19:42:54 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2022-11-29 17:39:45 (GMT)
commitd64adb9267213c0031b376633b70707ddcfc9ba6 (patch)
treef9a18fc6b412e24bbba34e6d3b8203441b305309 /Source/cmVSSetupHelper.cxx
parentf76ebc3c05fdb7e90673dd98392a01c41f056b18 (diff)
downloadCMake-d64adb9267213c0031b376633b70707ddcfc9ba6.zip
CMake-d64adb9267213c0031b376633b70707ddcfc9ba6.tar.gz
CMake-d64adb9267213c0031b376633b70707ddcfc9ba6.tar.bz2
clang-tidy: fix `readability-string-compare` lints
Diffstat (limited to 'Source/cmVSSetupHelper.cxx')
-rw-r--r--Source/cmVSSetupHelper.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmVSSetupHelper.cxx b/Source/cmVSSetupHelper.cxx
index e4cbe49..5729d2f 100644
--- a/Source/cmVSSetupHelper.cxx
+++ b/Source/cmVSSetupHelper.cxx
@@ -159,12 +159,12 @@ bool cmVSSetupAPIHelper::CheckInstalledComponent(
// the
// component name ex: Microsoft.VisualStudio.Component.Windows10SDK.10240
if (id.find(Win10SDKComponent) != std::wstring::npos &&
- type.compare(ComponentType) == 0) {
+ type == ComponentType) {
bWin10SDK = true;
ret = true;
}
- if (id.compare(Win81SDKComponent) == 0 && type.compare(ComponentType) == 0) {
+ if (id == Win81SDKComponent && type == ComponentType) {
bWin81SDK = true;
ret = true;
}
@@ -405,7 +405,7 @@ bool cmVSSetupAPIHelper::EnumerateVSInstancesWithCOM(
bool cmVSSetupAPIHelper::EnumerateAndChooseVSInstance()
{
bool isVSInstanceExists = false;
- if (chosenInstanceInfo.VSInstallLocation.compare("") != 0) {
+ if (!chosenInstanceInfo.VSInstallLocation.empty()) {
return true;
}