diff options
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 663a4c9..33437a1 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -500,7 +500,7 @@ void cmTarget::AddSources(std::vector<std::string> const& srcs) } if (!srcFiles.empty()) { cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); - this->Internal->SourceEntries.push_back(srcFiles); + this->Internal->SourceEntries.push_back(std::move(srcFiles)); this->Internal->SourceBacktraces.push_back(lfbt); } } @@ -747,10 +747,12 @@ void cmTarget::AddLinkLibrary(cmMakefile& mf, const std::string& lib, return; } - cmTarget::LibraryID tmp; - tmp.first = lib; - tmp.second = llt; - this->OriginalLinkLibraries.push_back(tmp); + { + cmTarget::LibraryID tmp; + tmp.first = lib; + tmp.second = llt; + this->OriginalLinkLibraries.emplace_back(lib, llt); + } // Add the explicit dependency information for this target. This is // simply a set of libraries separated by ";". There should always |