diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-08-02 09:41:48 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-08-28 16:44:38 (GMT) |
commit | 7fdc9a8b5f63f645b5aedede4fd18e0c1d1c39c5 (patch) | |
tree | fffc16fd7050e77984917abae8e48ffd4d1b8a74 | |
parent | 92041eec49ab4968b2d4f09e3bd71a3720d86036 (diff) | |
download | CMake-7fdc9a8b5f63f645b5aedede4fd18e0c1d1c39c5.zip CMake-7fdc9a8b5f63f645b5aedede4fd18e0c1d1c39c5.tar.gz CMake-7fdc9a8b5f63f645b5aedede4fd18e0c1d1c39c5.tar.bz2 |
QtAutogen: Use a smart pointer.
-rw-r--r-- | Source/cmQtAutoGenerators.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 9cb005c..9803c01 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -1218,7 +1218,7 @@ bool cmQtAutoGenerators::Run(const std::string& targetDirectory, cmGlobalGenerator gg(&cm); cmState::Snapshot snapshot = cm.GetCurrentSnapshot(); - cmLocalGenerator* lg = gg.CreateLocalGenerator(snapshot); + cmsys::auto_ptr<cmLocalGenerator> lg(gg.CreateLocalGenerator(snapshot)); lg->GetMakefile()->SetCurrentBinaryDirectory(targetDirectory); lg->GetMakefile()->SetCurrentSourceDirectory(targetDirectory); gg.SetCurrentMakefile(lg->GetMakefile()); @@ -1235,7 +1235,6 @@ bool cmQtAutoGenerators::Run(const std::string& targetDirectory, this->WriteOldMocDefinitionsFile(targetDirectory); - delete lg; return success; } |