summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio10Generator.cxx
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2019-12-09 17:13:42 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2019-12-09 23:24:06 (GMT)
commit36c8cae2e8c23228d3292e77b9bfc65b009bb263 (patch)
treed2dae86bea8247398e6edef358a72cd661e588a7 /Source/cmGlobalVisualStudio10Generator.cxx
parent352999ac4647d6c5b0d81890df4531d677532843 (diff)
downloadCMake-36c8cae2e8c23228d3292e77b9bfc65b009bb263.zip
CMake-36c8cae2e8c23228d3292e77b9bfc65b009bb263.tar.gz
CMake-36c8cae2e8c23228d3292e77b9bfc65b009bb263.tar.bz2
cmLocalGenerator: modernize memory management
Diffstat (limited to 'Source/cmGlobalVisualStudio10Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio10Generator.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index 5b83e2f..bdf4cf2 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -4,6 +4,8 @@
#include <algorithm>
+#include <cm/memory>
+
#include "cmsys/FStream.hxx"
#include "cmsys/Glob.hxx"
#include "cmsys/RegularExpression.hxx"
@@ -574,10 +576,11 @@ std::string cmGlobalVisualStudio10Generator::SelectWindowsCEToolset() const
}
//! Create a local generator appropriate to this Global Generator
-cmLocalGenerator* cmGlobalVisualStudio10Generator::CreateLocalGenerator(
- cmMakefile* mf)
+std::unique_ptr<cmLocalGenerator>
+cmGlobalVisualStudio10Generator::CreateLocalGenerator(cmMakefile* mf)
{
- return new cmLocalVisualStudio10Generator(this, mf);
+ return std::unique_ptr<cmLocalGenerator>(
+ cm::make_unique<cmLocalVisualStudio10Generator>(this, mf));
}
void cmGlobalVisualStudio10Generator::Generate()