summaryrefslogtreecommitdiffstats
path: root/Source/cmDefinePropertyCommand.cxx
diff options
context:
space:
mode:
authorPavel Solodovnikov <hellyeahdominate@gmail.com>2017-05-24 20:18:28 (GMT)
committerPavel Solodovnikov <hellyeahdominate@gmail.com>2017-05-26 16:50:11 (GMT)
commit86dc86dd6c66a6d61234efcddddddf466a6597d2 (patch)
treef7fcf0d9852d4d66b362a9c0fba67fd9d42661e8 /Source/cmDefinePropertyCommand.cxx
parent76bdb4076277cda0e68e1d80cdf715020eab5a7a (diff)
downloadCMake-86dc86dd6c66a6d61234efcddddddf466a6597d2.zip
CMake-86dc86dd6c66a6d61234efcddddddf466a6597d2.tar.gz
CMake-86dc86dd6c66a6d61234efcddddddf466a6597d2.tar.bz2
Add const-reference qualifications
Diffstat (limited to 'Source/cmDefinePropertyCommand.cxx')
-rw-r--r--Source/cmDefinePropertyCommand.cxx18
1 files changed, 10 insertions, 8 deletions
diff --git a/Source/cmDefinePropertyCommand.cxx b/Source/cmDefinePropertyCommand.cxx
index 9a097f3..86a83da 100644
--- a/Source/cmDefinePropertyCommand.cxx
+++ b/Source/cmDefinePropertyCommand.cxx
@@ -20,23 +20,25 @@ bool cmDefinePropertyCommand::InitialPass(std::vector<std::string> const& args,
// Get the scope in which to define the property.
cmProperty::ScopeType scope;
- if (args[0] == "GLOBAL") {
+ std::string const& scope_arg = args[0];
+
+ if (scope_arg == "GLOBAL") {
scope = cmProperty::GLOBAL;
- } else if (args[0] == "DIRECTORY") {
+ } else if (scope_arg == "DIRECTORY") {
scope = cmProperty::DIRECTORY;
- } else if (args[0] == "TARGET") {
+ } else if (scope_arg == "TARGET") {
scope = cmProperty::TARGET;
- } else if (args[0] == "SOURCE") {
+ } else if (scope_arg == "SOURCE") {
scope = cmProperty::SOURCE_FILE;
- } else if (args[0] == "TEST") {
+ } else if (scope_arg == "TEST") {
scope = cmProperty::TEST;
- } else if (args[0] == "VARIABLE") {
+ } else if (scope_arg == "VARIABLE") {
scope = cmProperty::VARIABLE;
- } else if (args[0] == "CACHED_VARIABLE") {
+ } else if (scope_arg == "CACHED_VARIABLE") {
scope = cmProperty::CACHED_VARIABLE;
} else {
std::ostringstream e;
- e << "given invalid scope " << args[0] << ". "
+ e << "given invalid scope " << scope_arg << ". "
<< "Valid scopes are "
<< "GLOBAL, DIRECTORY, TARGET, SOURCE, "
<< "TEST, VARIABLE, CACHED_VARIABLE.";