summaryrefslogtreecommitdiff
path: root/Source/cmGeneratorExpression.cxx
diff options
context:
space:
mode:
authorDaniel Eiband <daniel.eiband@brainlab.com>2019-09-22 00:06:45 +0200
committerDaniel Eiband <daniel.eiband@brainlab.com>2019-09-22 09:51:19 +0200
commitc12222db86859a5a5ce9163a5309bb0da10ec616 (patch)
tree674d778541027e2430ffe25a8155ad1aa2a44491 /Source/cmGeneratorExpression.cxx
parent1811411fecf3d9769ad7a13f6ecd01c5351df9c4 (diff)
downloadcmake-c12222db86859a5a5ce9163a5309bb0da10ec616.tar.gz
cmGeneratorExpression: Remove Evaluate overload by parameter re-ordering
Simplify by re-ordering parameters of cmCompiledGeneratorExpression::Evaluate so that frequently used parameters are before less frequently used parameters. This allows with little extra arguments to get rid of one Evaluate overload, which makes it easier to implement the cmGeneratorExpression::Evaluate utility. The latter would otherwise need four overloads.
Diffstat (limited to 'Source/cmGeneratorExpression.cxx')
-rw-r--r--Source/cmGeneratorExpression.cxx14
1 files changed, 2 insertions, 12 deletions
diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx
index 9472d9a5ab..1bc3452a3f 100644
--- a/Source/cmGeneratorExpression.cxx
+++ b/Source/cmGeneratorExpression.cxx
@@ -40,17 +40,7 @@ const std::string& cmCompiledGeneratorExpression::Evaluate(
cmLocalGenerator* lg, const std::string& config,
const cmGeneratorTarget* headTarget,
cmGeneratorExpressionDAGChecker* dagChecker,
- std::string const& language) const
-{
- return this->Evaluate(lg, config, headTarget, headTarget, dagChecker,
- language);
-}
-
-const std::string& cmCompiledGeneratorExpression::Evaluate(
- cmLocalGenerator* lg, const std::string& config,
- const cmGeneratorTarget* headTarget, const cmGeneratorTarget* currentTarget,
- cmGeneratorExpressionDAGChecker* dagChecker,
- std::string const& language) const
+ const cmGeneratorTarget* currentTarget, std::string const& language) const
{
cmGeneratorExpressionContext context(
lg, config, this->Quiet, headTarget,
@@ -391,7 +381,7 @@ const std::string& cmGeneratorExpressionInterpreter::Evaluate(
nullptr);
return this->CompiledGeneratorExpression->Evaluate(
- this->LocalGenerator, this->Config, this->HeadTarget, &dagChecker,
+ this->LocalGenerator, this->Config, this->HeadTarget, &dagChecker, nullptr,
this->Language);
}