diff options
author | Brad King <brad.king@kitware.com> | 2018-01-29 13:05:17 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-01-29 13:05:27 (GMT) |
commit | 92cd3d06772ada13935790d66927ab4663c7d628 (patch) | |
tree | 2550a2ad9003b47f9029c186aeabdfd6521bc615 /Source/cmAddCustomCommandCommand.cxx | |
parent | 18153217e27d2cf560d874313557ec9fa2bcffdb (diff) | |
parent | c85bb007df37aad9f20355cdf4d7ca9af562cb20 (diff) | |
download | CMake-92cd3d06772ada13935790d66927ab4663c7d628.zip CMake-92cd3d06772ada13935790d66927ab4663c7d628.tar.gz CMake-92cd3d06772ada13935790d66927ab4663c7d628.tar.bz2 |
Merge topic 'reduce-temporaries'
c85bb007 Reduce allocation of temporary values on heap.
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1698
Diffstat (limited to 'Source/cmAddCustomCommandCommand.cxx')
-rw-r--r-- | Source/cmAddCustomCommandCommand.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/cmAddCustomCommandCommand.cxx b/Source/cmAddCustomCommandCommand.cxx index 7fed52d..14dfdae 100644 --- a/Source/cmAddCustomCommandCommand.cxx +++ b/Source/cmAddCustomCommandCommand.cxx @@ -3,6 +3,7 @@ #include "cmAddCustomCommandCommand.h" #include <sstream> +#include <utility> #include "cmCustomCommand.h" #include "cmCustomCommandLines.h" @@ -184,9 +185,7 @@ bool cmAddCustomCommandCommand::InitialPass( depends.push_back(dep); // Add the implicit dependency language and file. - cmCustomCommand::ImplicitDependsPair entry(implicit_depends_lang, - dep); - implicit_depends.push_back(entry); + implicit_depends.emplace_back(implicit_depends_lang, dep); // Switch back to looking for a language. doing = doing_implicit_depends_lang; @@ -200,7 +199,7 @@ bool cmAddCustomCommandCommand::InitialPass( case doing_depends: { std::string dep = copy; cmSystemTools::ConvertToUnixSlashes(dep); - depends.push_back(dep); + depends.push_back(std::move(dep)); } break; case doing_outputs: outputs.push_back(filename); |