summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaTargetGenerator.cxx
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2023-05-01 17:12:46 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2023-05-04 17:34:36 (GMT)
commit72faa9a0175f7651c2707fead6a41450d2aaec88 (patch)
treee62fa3432742f1c62d1d911544e4cf42ca4028bd /Source/cmNinjaTargetGenerator.cxx
parent0d2d5a229c1cda842f0e67134637f19fc69de6c6 (diff)
downloadCMake-72faa9a0175f7651c2707fead6a41450d2aaec88.zip
CMake-72faa9a0175f7651c2707fead6a41450d2aaec88.tar.gz
CMake-72faa9a0175f7651c2707fead6a41450d2aaec88.tar.bz2
CreateRulePlaceholderExpander(): enhance memory management
This method returns now a std::unique_ptr instance rather than a raw pointer.
Diffstat (limited to 'Source/cmNinjaTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaTargetGenerator.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 7ce6c96..4ed491d 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -665,8 +665,8 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang,
std::string const modmapFormat =
this->Makefile->GetSafeDefinition(modmapFormatVar);
- std::unique_ptr<cmRulePlaceholderExpander> rulePlaceholderExpander(
- this->GetLocalGenerator()->CreateRulePlaceholderExpander());
+ auto rulePlaceholderExpander =
+ this->GetLocalGenerator()->CreateRulePlaceholderExpander();
std::string const tdi = this->GetLocalGenerator()->ConvertToOutputFormat(
this->ConvertToNinjaPath(this->GetTargetDependInfoPath(lang, config)),
@@ -1865,8 +1865,8 @@ void cmNinjaTargetGenerator::ExportObjectCompileCommand(
this->Makefile->GetRequiredDefinition(cmdVar);
cmList compileCmds(compileCmd);
- std::unique_ptr<cmRulePlaceholderExpander> rulePlaceholderExpander(
- this->GetLocalGenerator()->CreateRulePlaceholderExpander());
+ auto rulePlaceholderExpander =
+ this->GetLocalGenerator()->CreateRulePlaceholderExpander();
for (auto& i : compileCmds) {
// no launcher for CMAKE_EXPORT_COMPILE_COMMANDS