diff options
author | Tushar Maheshwari <tushar27192@gmail.com> | 2019-09-08 09:14:55 (GMT) |
---|---|---|
committer | Tushar Maheshwari <tushar27192@gmail.com> | 2019-09-19 13:50:29 (GMT) |
commit | 6511fa6f3309984fc10de8471017c2bb32d8d286 (patch) | |
tree | fb4b068962d37cc9763fd779f45662edc7fd1179 /Source/cmExportSet.cxx | |
parent | 9b8a1f7c28deac892493b0a5548b08b2003238ea (diff) | |
download | CMake-6511fa6f3309984fc10de8471017c2bb32d8d286.zip CMake-6511fa6f3309984fc10de8471017c2bb32d8d286.tar.gz CMake-6511fa6f3309984fc10de8471017c2bb32d8d286.tar.bz2 |
cmExportSet: default destructor
Diffstat (limited to 'Source/cmExportSet.cxx')
-rw-r--r-- | Source/cmExportSet.cxx | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/Source/cmExportSet.cxx b/Source/cmExportSet.cxx index a6fa186..05f1b5d 100644 --- a/Source/cmExportSet.cxx +++ b/Source/cmExportSet.cxx @@ -2,25 +2,28 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmExportSet.h" -#include "cmAlgorithms.h" +#include <utility> + #include "cmLocalGenerator.h" #include "cmTargetExport.h" -cmExportSet::~cmExportSet() +cmExportSet::cmExportSet(std::string name) + : Name(std::move(name)) { - cmDeleteAll(this->TargetExports); } +cmExportSet::~cmExportSet() = default; + void cmExportSet::Compute(cmLocalGenerator* lg) { - for (cmTargetExport* tgtExport : this->TargetExports) { + for (std::unique_ptr<cmTargetExport>& tgtExport : this->TargetExports) { tgtExport->Target = lg->FindGeneratorTargetToUse(tgtExport->TargetName); } } -void cmExportSet::AddTargetExport(cmTargetExport* te) +void cmExportSet::AddTargetExport(std::unique_ptr<cmTargetExport> te) { - this->TargetExports.push_back(te); + this->TargetExports.emplace_back(std::move(te)); } void cmExportSet::AddInstallation(cmInstallExportGenerator const* installation) |