diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2022-11-22 19:11:07 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2022-11-29 17:39:45 (GMT) |
commit | 4deab0a75c0da66938c230a446af5ecd6f3c5ca3 (patch) | |
tree | da2a018bdb2564934dbea62c60111c5f55c5dbce /Source/cmVisualStudioSlnData.cxx | |
parent | 714a466eeb42809fa56d78d6aef6cde70d938af5 (diff) | |
download | CMake-4deab0a75c0da66938c230a446af5ecd6f3c5ca3.zip CMake-4deab0a75c0da66938c230a446af5ecd6f3c5ca3.tar.gz CMake-4deab0a75c0da66938c230a446af5ecd6f3c5ca3.tar.bz2 |
clang-tidy: fix `readability-braces-around-statements` lints
Diffstat (limited to 'Source/cmVisualStudioSlnData.cxx')
-rw-r--r-- | Source/cmVisualStudioSlnData.cxx | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/Source/cmVisualStudioSlnData.cxx b/Source/cmVisualStudioSlnData.cxx index 98bbc34..fe261dd 100644 --- a/Source/cmVisualStudioSlnData.cxx +++ b/Source/cmVisualStudioSlnData.cxx @@ -24,8 +24,9 @@ const cm::optional<cmSlnProjectEntry> cmSlnData::GetProjectByGUID( const std::string& projectGUID) const { auto it(ProjectsByGUID.find(projectGUID)); - if (it != ProjectsByGUID.end()) + if (it != ProjectsByGUID.end()) { return it->second; + } return cm::nullopt; } @@ -33,8 +34,9 @@ const cm::optional<cmSlnProjectEntry> cmSlnData::GetProjectByName( const std::string& projectName) const { auto it(ProjectNameIndex.find(projectName)); - if (it != ProjectNameIndex.end()) + if (it != ProjectNameIndex.end()) { return it->second->second; + } return cm::nullopt; } @@ -42,8 +44,9 @@ std::vector<cmSlnProjectEntry> cmSlnData::GetProjects() const { auto it(this->ProjectNameIndex.begin()), itEnd(this->ProjectNameIndex.end()); std::vector<cmSlnProjectEntry> result; - for (; it != itEnd; ++it) + for (; it != itEnd; ++it) { result.push_back(it->second->second); + } return result; } @@ -52,8 +55,9 @@ cmSlnProjectEntry* cmSlnData::AddProject( const std::string& projectRelativePath) { auto it(ProjectsByGUID.find(projectGUID)); - if (it != ProjectsByGUID.end()) + if (it != ProjectsByGUID.end()) { return nullptr; + } it = ProjectsByGUID .insert(ProjectStorage::value_type( projectGUID, @@ -69,17 +73,20 @@ std::string cmSlnData::GetConfigurationTarget( { std::string solutionTarget = solutionConfiguration + "|" + platformName; cm::optional<cmSlnProjectEntry> project = GetProjectByName(projectName); - if (!project) + if (!project) { return platformName; + } std::string projectTarget = project->GetProjectConfiguration(solutionTarget); - if (projectTarget.empty()) + if (projectTarget.empty()) { return platformName; + } std::vector<std::string> targetElements = cmSystemTools::SplitString(projectTarget, '|'); - if (targetElements.size() != 2) + if (targetElements.size() != 2) { return platformName; + } return targetElements[1]; } |