summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorExpressionEvaluator.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2014-04-30 17:13:21 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2014-06-09 18:45:35 (GMT)
commit7492a7b8465d28c7f4377372153ef1e10ff336d5 (patch)
tree1509344bf434b6c75b67ecacad9ec5fe11bb9c2e /Source/cmGeneratorExpressionEvaluator.cxx
parent3e7194a215aed5e34acf32ad4b8c6bd948beb15e (diff)
downloadCMake-7492a7b8465d28c7f4377372153ef1e10ff336d5.zip
CMake-7492a7b8465d28c7f4377372153ef1e10ff336d5.tar.gz
CMake-7492a7b8465d28c7f4377372153ef1e10ff336d5.tar.bz2
regex: Search on strings where possible
Diffstat (limited to 'Source/cmGeneratorExpressionEvaluator.cxx')
-rw-r--r--Source/cmGeneratorExpressionEvaluator.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index 07362c3..7dcb335 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -402,7 +402,7 @@ struct CompilerIdNode : public cmGeneratorExpressionNode
return compilerId ? compilerId : "";
}
static cmsys::RegularExpression compilerIdValidator("^[A-Za-z0-9_]*$");
- if (!compilerIdValidator.find(parameters.begin()->c_str()))
+ if (!compilerIdValidator.find(*parameters.begin()))
{
reportError(context, content->GetOriginalExpression(),
"Expression syntax not recognized.");
@@ -509,7 +509,7 @@ struct CompilerVersionNode : public cmGeneratorExpressionNode
}
static cmsys::RegularExpression compilerIdValidator("^[0-9\\.]*$");
- if (!compilerIdValidator.find(parameters.begin()->c_str()))
+ if (!compilerIdValidator.find(*parameters.begin()))
{
reportError(context, content->GetOriginalExpression(),
"Expression syntax not recognized.");
@@ -710,7 +710,7 @@ static const struct ConfigurationTestNode : public cmGeneratorExpressionNode
return configurationNode.Evaluate(parameters, context, content, 0);
}
static cmsys::RegularExpression configValidator("^[A-Za-z0-9_]*$");
- if (!configValidator.find(parameters.begin()->c_str()))
+ if (!configValidator.find(*parameters.begin()))
{
reportError(context, content->GetOriginalExpression(),
"Expression syntax not recognized.");
@@ -969,7 +969,7 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
return std::string();
}
- if (!propertyNameValidator.find(propertyName.c_str()))
+ if (!propertyNameValidator.find(propertyName))
{
::reportError(context, content->GetOriginalExpression(),
"Property name not supported.");