summaryrefslogtreecommitdiff
path: root/Source/cmGeneratorExpressionEvaluator.h
diff options
context:
space:
mode:
authorFrank Winklmeier <frank.winklmeier@cern.ch>2018-02-20 15:38:08 +0100
committerBrad King <brad.king@kitware.com>2018-02-21 11:11:50 -0500
commit46436581c668365ff8df25dcfca5b13a0fd50200 (patch)
tree119631a15575990882ce566f24c0522ef263d06b /Source/cmGeneratorExpressionEvaluator.h
parent31419815aa8cd376b1cdfd1d77c0d5c4802f4ecc (diff)
downloadcmake-46436581c668365ff8df25dcfca5b13a0fd50200.tar.gz
cmGeneratorExpression: Use std::move to avoid vector copies
Use move semantics in GeneratorExpressionContent::SetIdentifier and ::SetParameters to avoid vector copies.
Diffstat (limited to 'Source/cmGeneratorExpressionEvaluator.h')
-rw-r--r--Source/cmGeneratorExpressionEvaluator.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/cmGeneratorExpressionEvaluator.h b/Source/cmGeneratorExpressionEvaluator.h
index 92dac79ea8..0561799504 100644
--- a/Source/cmGeneratorExpressionEvaluator.h
+++ b/Source/cmGeneratorExpressionEvaluator.h
@@ -7,6 +7,7 @@
#include <stddef.h>
#include <string>
+#include <utility>
#include <vector>
struct cmGeneratorExpressionContext;
@@ -64,17 +65,16 @@ private:
struct GeneratorExpressionContent : public cmGeneratorExpressionEvaluator
{
GeneratorExpressionContent(const char* startContent, size_t length);
- void SetIdentifier(
- std::vector<cmGeneratorExpressionEvaluator*> const& identifier)
+
+ void SetIdentifier(std::vector<cmGeneratorExpressionEvaluator*> identifier)
{
- this->IdentifierChildren = identifier;
+ this->IdentifierChildren = std::move(identifier);
}
void SetParameters(
- std::vector<std::vector<cmGeneratorExpressionEvaluator*>> const&
- parameters)
+ std::vector<std::vector<cmGeneratorExpressionEvaluator*>> parameters)
{
- this->ParamChildren = parameters;
+ this->ParamChildren = std::move(parameters);
}
Type GetType() const override