summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorExpressionEvaluator.h
diff options
context:
space:
mode:
authorKitware Robot <kwrobot@kitware.com>2016-05-16 14:34:04 (GMT)
committerBrad King <brad.king@kitware.com>2016-05-16 20:05:19 (GMT)
commitd9fd2f5402eeaa345691313658e02b51038f570b (patch)
treedca71b9a7e267f4c6300da3eb770415381726785 /Source/cmGeneratorExpressionEvaluator.h
parent82df6deaafb36cbbfd450202bb20b320f637751a (diff)
downloadCMake-d9fd2f5402eeaa345691313658e02b51038f570b.zip
CMake-d9fd2f5402eeaa345691313658e02b51038f570b.tar.gz
CMake-d9fd2f5402eeaa345691313658e02b51038f570b.tar.bz2
Revise C++ coding style using clang-format
Run the `Utilities/Scripts/clang-format.bash` script to update all our C++ code to a new style defined by `.clang-format`. Use `clang-format` version 3.8. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
Diffstat (limited to 'Source/cmGeneratorExpressionEvaluator.h')
-rw-r--r--Source/cmGeneratorExpressionEvaluator.h69
1 files changed, 28 insertions, 41 deletions
diff --git a/Source/cmGeneratorExpressionEvaluator.h b/Source/cmGeneratorExpressionEvaluator.h
index bce486b..7ca62c5 100644
--- a/Source/cmGeneratorExpressionEvaluator.h
+++ b/Source/cmGeneratorExpressionEvaluator.h
@@ -35,93 +35,80 @@ struct cmGeneratorExpressionEvaluator
virtual Type GetType() const = 0;
- virtual std::string Evaluate(cmGeneratorExpressionContext *context,
- cmGeneratorExpressionDAGChecker *) const = 0;
+ virtual std::string Evaluate(cmGeneratorExpressionContext* context,
+ cmGeneratorExpressionDAGChecker*) const = 0;
private:
- cmGeneratorExpressionEvaluator(const cmGeneratorExpressionEvaluator &);
- void operator=(const cmGeneratorExpressionEvaluator &);
+ cmGeneratorExpressionEvaluator(const cmGeneratorExpressionEvaluator&);
+ void operator=(const cmGeneratorExpressionEvaluator&);
};
struct TextContent : public cmGeneratorExpressionEvaluator
{
- TextContent(const char *start, size_t length)
- : Content(start), Length(length)
+ TextContent(const char* start, size_t length)
+ : Content(start)
+ , Length(length)
{
-
}
- std::string Evaluate(cmGeneratorExpressionContext *,
- cmGeneratorExpressionDAGChecker *) const
+ std::string Evaluate(cmGeneratorExpressionContext*,
+ cmGeneratorExpressionDAGChecker*) const
{
return std::string(this->Content, this->Length);
}
- Type GetType() const
- {
- return cmGeneratorExpressionEvaluator::Text;
- }
+ Type GetType() const { return cmGeneratorExpressionEvaluator::Text; }
- void Extend(size_t length)
- {
- this->Length += length;
- }
+ void Extend(size_t length) { this->Length += length; }
- size_t GetLength()
- {
- return this->Length;
- }
+ size_t GetLength() { return this->Length; }
private:
- const char *Content;
+ const char* Content;
size_t Length;
};
struct GeneratorExpressionContent : public cmGeneratorExpressionEvaluator
{
- GeneratorExpressionContent(const char *startContent, size_t length);
+ GeneratorExpressionContent(const char* startContent, size_t length);
void SetIdentifier(std::vector<cmGeneratorExpressionEvaluator*> identifier)
{
this->IdentifierChildren = identifier;
}
void SetParameters(
- std::vector<std::vector<cmGeneratorExpressionEvaluator*> > parameters)
+ std::vector<std::vector<cmGeneratorExpressionEvaluator*> > parameters)
{
this->ParamChildren = parameters;
}
- Type GetType() const
- {
- return cmGeneratorExpressionEvaluator::Generator;
- }
+ Type GetType() const { return cmGeneratorExpressionEvaluator::Generator; }
- std::string Evaluate(cmGeneratorExpressionContext *context,
- cmGeneratorExpressionDAGChecker *) const;
+ std::string Evaluate(cmGeneratorExpressionContext* context,
+ cmGeneratorExpressionDAGChecker*) const;
std::string GetOriginalExpression() const;
~GeneratorExpressionContent();
private:
- std::string EvaluateParameters(const cmGeneratorExpressionNode *node,
- const std::string &identifier,
- cmGeneratorExpressionContext *context,
- cmGeneratorExpressionDAGChecker *dagChecker,
- std::vector<std::string> &parameters) const;
+ std::string EvaluateParameters(const cmGeneratorExpressionNode* node,
+ const std::string& identifier,
+ cmGeneratorExpressionContext* context,
+ cmGeneratorExpressionDAGChecker* dagChecker,
+ std::vector<std::string>& parameters) const;
std::string ProcessArbitraryContent(
- const cmGeneratorExpressionNode *node,
- const std::string &identifier,
- cmGeneratorExpressionContext *context,
- cmGeneratorExpressionDAGChecker *dagChecker,
+ const cmGeneratorExpressionNode* node, const std::string& identifier,
+ cmGeneratorExpressionContext* context,
+ cmGeneratorExpressionDAGChecker* dagChecker,
std::vector<std::vector<cmGeneratorExpressionEvaluator*> >::const_iterator
- pit) const;
+ pit) const;
private:
std::vector<cmGeneratorExpressionEvaluator*> IdentifierChildren;
std::vector<std::vector<cmGeneratorExpressionEvaluator*> > ParamChildren;
- const char *StartContent;
+ const char* StartContent;
size_t ContentLength;
};