summaryrefslogtreecommitdiffstats
path: root/Source/cmVSSetupHelper.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2022-11-22 18:58:40 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2022-11-29 17:39:29 (GMT)
commitb72c45e39fa9dd5870046bb5cf25d33049006bd5 (patch)
tree5bbeafd0dc942663e48b999e6d41d0446e1d2b1d /Source/cmVSSetupHelper.cxx
parent07172aa31ec468baea0dc3e52ce6f706f55d6f12 (diff)
downloadCMake-b72c45e39fa9dd5870046bb5cf25d33049006bd5.zip
CMake-b72c45e39fa9dd5870046bb5cf25d33049006bd5.tar.gz
CMake-b72c45e39fa9dd5870046bb5cf25d33049006bd5.tar.bz2
clang-tidy: fix `readability-else-after-return` lints
Diffstat (limited to 'Source/cmVSSetupHelper.cxx')
-rw-r--r--Source/cmVSSetupHelper.cxx12
1 files changed, 5 insertions, 7 deletions
diff --git a/Source/cmVSSetupHelper.cxx b/Source/cmVSSetupHelper.cxx
index a3f0faf..43c52bf 100644
--- a/Source/cmVSSetupHelper.cxx
+++ b/Source/cmVSSetupHelper.cxx
@@ -187,21 +187,19 @@ bool cmVSSetupAPIHelper::GetVSInstanceInfo(
SmartBSTR bstrVersion;
if (FAILED(pInstance->GetInstallationVersion(&bstrVersion))) {
return false;
- } else {
- vsInstanceInfo.Version =
- cmsys::Encoding::ToNarrow(std::wstring(bstrVersion));
}
+ vsInstanceInfo.Version =
+ cmsys::Encoding::ToNarrow(std::wstring(bstrVersion));
// Reboot may have been required before the installation path was created.
SmartBSTR bstrInstallationPath;
if ((eLocal & state) == eLocal) {
if (FAILED(pInstance->GetInstallationPath(&bstrInstallationPath))) {
return false;
- } else {
- vsInstanceInfo.VSInstallLocation =
- cmsys::Encoding::ToNarrow(std::wstring(bstrInstallationPath));
- cmSystemTools::ConvertToUnixSlashes(vsInstanceInfo.VSInstallLocation);
}
+ vsInstanceInfo.VSInstallLocation =
+ cmsys::Encoding::ToNarrow(std::wstring(bstrInstallationPath));
+ cmSystemTools::ConvertToUnixSlashes(vsInstanceInfo.VSInstallLocation);
}
// Check if a compiler is installed with this instance.