summaryrefslogtreecommitdiff
path: root/Source/cmLocalNinjaGenerator.cxx
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2019-05-10 19:22:52 +0200
committerSebastian Holtermann <sebholt@xwmw.org>2019-05-13 17:20:27 +0200
commit30a550d6ade191e6510fb74a73fe34f1615b6086 (patch)
treecf7e21d9e58bc4a14c451b1394d4917c92ef0a0c /Source/cmLocalNinjaGenerator.cxx
parent0024356f8e8e5f9ec2fa6af1e651c634eba3b22b (diff)
downloadcmake-30a550d6ade191e6510fb74a73fe34f1615b6086.tar.gz
Ninja: In cmNinjaTargetGenerator use std::unique_ptr to manage new instances
Diffstat (limited to 'Source/cmLocalNinjaGenerator.cxx')
-rw-r--r--Source/cmLocalNinjaGenerator.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx
index 515651a450..e6d44572ed 100644
--- a/Source/cmLocalNinjaGenerator.cxx
+++ b/Source/cmLocalNinjaGenerator.cxx
@@ -83,14 +83,13 @@ void cmLocalNinjaGenerator::Generate()
if (target->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
continue;
}
- cmNinjaTargetGenerator* tg = cmNinjaTargetGenerator::New(target);
+ auto tg = cmNinjaTargetGenerator::New(target);
if (tg) {
tg->Generate();
// Add the target to "all" if required.
if (!this->GetGlobalNinjaGenerator()->IsExcluded(target)) {
this->GetGlobalNinjaGenerator()->AddDependencyToAll(target);
}
- delete tg;
}
}