summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2022-11-22 19:54:33 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2022-11-29 17:39:45 (GMT)
commit501408338aa403d9af50b2ba60f816cec5dcc06b (patch)
tree91d7772f4544f85fc8ffb624bc3d71b00558594a /Source
parent1f893e587371cbce2007cae55c118fcf50dca849 (diff)
downloadCMake-501408338aa403d9af50b2ba60f816cec5dcc06b.zip
CMake-501408338aa403d9af50b2ba60f816cec5dcc06b.tar.gz
CMake-501408338aa403d9af50b2ba60f816cec5dcc06b.tar.bz2
clang-tidy: fix `readability-isolate-declaration` lints
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalVisualStudioVersionedGenerator.cxx3
-rw-r--r--Source/cmVSSetupHelper.cxx7
-rw-r--r--Source/cmVisualStudioSlnData.cxx3
3 files changed, 9 insertions, 4 deletions
diff --git a/Source/cmGlobalVisualStudioVersionedGenerator.cxx b/Source/cmGlobalVisualStudioVersionedGenerator.cxx
index 8dd7545..59f1dc2 100644
--- a/Source/cmGlobalVisualStudioVersionedGenerator.cxx
+++ b/Source/cmGlobalVisualStudioVersionedGenerator.cxx
@@ -53,7 +53,8 @@ static bool VSIsArm64Host()
# undef CM_VS_GCC_DIAGNOSTIC_PUSHED
#endif
- USHORT processMachine, nativeMachine;
+ USHORT processMachine;
+ USHORT nativeMachine;
return s_IsWow64Process2Impl != nullptr &&
s_IsWow64Process2Impl(GetCurrentProcess(), &processMachine,
diff --git a/Source/cmVSSetupHelper.cxx b/Source/cmVSSetupHelper.cxx
index 5729d2f..6702b7b 100644
--- a/Source/cmVSSetupHelper.cxx
+++ b/Source/cmVSSetupHelper.cxx
@@ -289,7 +289,8 @@ bool cmVSSetupAPIHelper::GetVCToolsetVersion(std::string& vsToolsetVersion)
bool cmVSSetupAPIHelper::IsEWDKEnabled()
{
- std::string envEnterpriseWDK, envDisableRegistryUse;
+ std::string envEnterpriseWDK;
+ std::string envDisableRegistryUse;
cmSystemTools::GetEnv("EnterpriseWDK", envEnterpriseWDK);
cmSystemTools::GetEnv("DisableRegistryUse", envDisableRegistryUse);
if (!cmSystemTools::Strucmp(envEnterpriseWDK.c_str(), "True") &&
@@ -410,7 +411,9 @@ bool cmVSSetupAPIHelper::EnumerateAndChooseVSInstance()
}
if (this->IsEWDKEnabled()) {
- std::string envWindowsSdkDir81, envVSVersion, envVsInstallDir;
+ std::string envWindowsSdkDir81;
+ std::string envVSVersion;
+ std::string envVsInstallDir;
cmSystemTools::GetEnv("WindowsSdkDir_81", envWindowsSdkDir81);
cmSystemTools::GetEnv("VisualStudioVersion", envVSVersion);
diff --git a/Source/cmVisualStudioSlnData.cxx b/Source/cmVisualStudioSlnData.cxx
index fe261dd..8ed0ab8 100644
--- a/Source/cmVisualStudioSlnData.cxx
+++ b/Source/cmVisualStudioSlnData.cxx
@@ -42,7 +42,8 @@ const cm::optional<cmSlnProjectEntry> cmSlnData::GetProjectByName(
std::vector<cmSlnProjectEntry> cmSlnData::GetProjects() const
{
- auto it(this->ProjectNameIndex.begin()), itEnd(this->ProjectNameIndex.end());
+ auto it(this->ProjectNameIndex.begin());
+ auto itEnd(this->ProjectNameIndex.end());
std::vector<cmSlnProjectEntry> result;
for (; it != itEnd; ++it) {
result.push_back(it->second->second);