mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-11 23:43:58 +03:00
QtAutogen: Use a smart pointer.
This commit is contained in:
1 parent
92041eec49
commit
7fdc9a8b5f
1 file changed
+1
-2
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user