diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2023-05-01 17:12:46 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2023-05-04 17:34:36 (GMT) |
commit | 72faa9a0175f7651c2707fead6a41450d2aaec88 (patch) | |
tree | e62fa3432742f1c62d1d911544e4cf42ca4028bd /Source/cmMakefileLibraryTargetGenerator.cxx | |
parent | 0d2d5a229c1cda842f0e67134637f19fc69de6c6 (diff) | |
download | CMake-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/cmMakefileLibraryTargetGenerator.cxx')
-rw-r--r-- | Source/cmMakefileLibraryTargetGenerator.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index 0ebbe4d..b07a74b 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -373,8 +373,8 @@ void cmMakefileLibraryTargetGenerator::WriteNvidiaDeviceLibraryRules( launcher = cmStrCat(val, ' '); } - std::unique_ptr<cmRulePlaceholderExpander> rulePlaceholderExpander( - this->LocalGenerator->CreateRulePlaceholderExpander()); + auto rulePlaceholderExpander = + this->LocalGenerator->CreateRulePlaceholderExpander(); // Construct the main link rule and expand placeholders. rulePlaceholderExpander->SetTargetImpLib(targetOutput); @@ -696,8 +696,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( } // Expand the rule variables. - std::unique_ptr<cmRulePlaceholderExpander> rulePlaceholderExpander( - this->LocalGenerator->CreateRulePlaceholderExpander()); + auto rulePlaceholderExpander = + this->LocalGenerator->CreateRulePlaceholderExpander(); bool useWatcomQuote = this->Makefile->IsOn(linkRuleVar + "_USE_WATCOM_QUOTE"); cmList real_link_commands; |