diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2014-02-08 17:01:01 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-03-08 18:05:36 (GMT) |
commit | cfc2cf9559eacbf45d04249ee1dd7f75bb0cdff0 (patch) | |
tree | 608adc93feb8296339b4cd035ddf34a10995af94 /Source/cmGeneratorExpression.cxx | |
parent | f0ad6631adb7cd364e2bcf5e8738c697c902e0ad (diff) | |
download | CMake-cfc2cf9559eacbf45d04249ee1dd7f75bb0cdff0.zip CMake-cfc2cf9559eacbf45d04249ee1dd7f75bb0cdff0.tar.gz CMake-cfc2cf9559eacbf45d04249ee1dd7f75bb0cdff0.tar.bz2 |
cmGeneratorExpression: Tokenize over strings
Diffstat (limited to 'Source/cmGeneratorExpression.cxx')
-rw-r--r-- | Source/cmGeneratorExpression.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx index 3ebb1b6..433adcf 100644 --- a/Source/cmGeneratorExpression.cxx +++ b/Source/cmGeneratorExpression.cxx @@ -33,17 +33,17 @@ cmGeneratorExpression::cmGeneratorExpression( cmsys::auto_ptr<cmCompiledGeneratorExpression> cmGeneratorExpression::Parse(std::string const& input) { - return this->Parse(input.c_str()); + return cmsys::auto_ptr<cmCompiledGeneratorExpression>( + new cmCompiledGeneratorExpression( + this->Backtrace, + input)); } //---------------------------------------------------------------------------- cmsys::auto_ptr<cmCompiledGeneratorExpression> cmGeneratorExpression::Parse(const char* input) { - return cmsys::auto_ptr<cmCompiledGeneratorExpression>( - new cmCompiledGeneratorExpression( - this->Backtrace, - input)); + return this->Parse(std::string(input ? input : "")); } cmGeneratorExpression::~cmGeneratorExpression() @@ -122,13 +122,13 @@ const char *cmCompiledGeneratorExpression::Evaluate( cmCompiledGeneratorExpression::cmCompiledGeneratorExpression( cmListFileBacktrace const& backtrace, - const char *input) - : Backtrace(backtrace), Input(input ? input : ""), + const std::string& input) + : Backtrace(backtrace), Input(input), HadContextSensitiveCondition(false) { cmGeneratorExpressionLexer l; std::vector<cmGeneratorExpressionToken> tokens = - l.Tokenize(this->Input.c_str()); + l.Tokenize(this->Input); this->NeedsEvaluation = l.GetSawGeneratorExpression(); if (this->NeedsEvaluation) |