mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-09 07:39:47 -05:00
Refactor: Add some const to vars
This commit is contained in:
@@ -199,7 +199,7 @@ bool cmProjectCommand::InitialPass(std::vector<std::string> const& args,
|
|||||||
languages.emplace_back("NONE");
|
languages.emplace_back("NONE");
|
||||||
}
|
}
|
||||||
|
|
||||||
cmPolicies::PolicyStatus cmp0048 =
|
cmPolicies::PolicyStatus const cmp0048 =
|
||||||
this->Makefile->GetPolicyStatus(cmPolicies::CMP0048);
|
this->Makefile->GetPolicyStatus(cmPolicies::CMP0048);
|
||||||
if (haveVersion) {
|
if (haveVersion) {
|
||||||
// Set project VERSION variables to given values
|
// Set project VERSION variables to given values
|
||||||
@@ -280,7 +280,7 @@ bool cmProjectCommand::InitialPass(std::vector<std::string> const& args,
|
|||||||
}
|
}
|
||||||
std::string vw;
|
std::string vw;
|
||||||
for (std::string const& i : vv) {
|
for (std::string const& i : vv) {
|
||||||
const char* v = this->Makefile->GetDefinition(i);
|
const char* const v = this->Makefile->GetDefinition(i);
|
||||||
if (v && *v) {
|
if (v && *v) {
|
||||||
if (cmp0048 == cmPolicies::WARN) {
|
if (cmp0048 == cmPolicies::WARN) {
|
||||||
if (!injectedProjectCommand) {
|
if (!injectedProjectCommand) {
|
||||||
@@ -330,7 +330,7 @@ bool cmProjectCommand::InitialPass(std::vector<std::string> const& args,
|
|||||||
|
|
||||||
bool cmProjectCommand::IncludeByVariable(const std::string& variable)
|
bool cmProjectCommand::IncludeByVariable(const std::string& variable)
|
||||||
{
|
{
|
||||||
const char* include = this->Makefile->GetDefinition(variable);
|
const char* const include = this->Makefile->GetDefinition(variable);
|
||||||
if (!include) {
|
if (!include) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user