summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalVisualStudio7Generator.cxx
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2019-11-07 17:52:06 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2019-11-11 15:41:13 (GMT)
commitf93385283fc86639c0a13b920c66c3a8f42276bb (patch)
tree7fa219d170720581d6d8438d0be6a1162e0c3b51 /Source/cmLocalVisualStudio7Generator.cxx
parent101b5288ffa988b86fc1fe83f3ff65c9694b1484 (diff)
downloadCMake-f93385283fc86639c0a13b920c66c3a8f42276bb.zip
CMake-f93385283fc86639c0a13b920c66c3a8f42276bb.tar.gz
CMake-f93385283fc86639c0a13b920c66c3a8f42276bb.tar.bz2
cmLocalGenerator: modernize memory management
Diffstat (limited to 'Source/cmLocalVisualStudio7Generator.cxx')
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index fd346df..672b190 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -64,8 +64,8 @@ cmLocalVisualStudio7Generator::~cmLocalVisualStudio7Generator()
void cmLocalVisualStudio7Generator::AddHelperCommands()
{
// Now create GUIDs for targets
- const std::vector<cmGeneratorTarget*>& tgts = this->GetGeneratorTargets();
- for (cmGeneratorTarget const* l : tgts) {
+ const auto& tgts = this->GetGeneratorTargets();
+ for (const auto& l : tgts) {
if (l->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
continue;
}
@@ -89,8 +89,8 @@ void cmLocalVisualStudio7Generator::FixGlobalTargets()
// Visual Studio .NET 2003 Service Pack 1 will not run post-build
// commands for targets in which no sources are built. Add dummy
// rules to force these targets to build.
- const std::vector<cmGeneratorTarget*>& tgts = this->GetGeneratorTargets();
- for (cmGeneratorTarget* l : tgts) {
+ const auto& tgts = this->GetGeneratorTargets();
+ for (auto& l : tgts) {
if (l->GetType() == cmStateEnums::GLOBAL_TARGET) {
std::vector<std::string> no_depends;
cmCustomCommandLines force_commands =
@@ -125,17 +125,17 @@ void cmLocalVisualStudio7Generator::WriteProjectFiles()
}
// Get the set of targets in this directory.
- const std::vector<cmGeneratorTarget*>& tgts = this->GetGeneratorTargets();
+ const auto& tgts = this->GetGeneratorTargets();
// Create the project file for each target.
- for (cmGeneratorTarget* l : tgts) {
+ for (const auto& l : tgts) {
if (l->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
continue;
}
// INCLUDE_EXTERNAL_MSPROJECT command only affects the workspace
// so don't build a projectfile for it
if (!l->GetProperty("EXTERNAL_MSPROJECT")) {
- this->CreateSingleVCProj(l->GetName(), l);
+ this->CreateSingleVCProj(l->GetName(), l.get());
}
}
}