mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-25 07:58:59 -06:00
cmMakefile: Remove redundant conditions.
This container is never empty.
This commit is contained in:
@@ -1730,8 +1730,7 @@ void cmMakefile::AddDefinition(const std::string& name, const char* value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
this->Internal->SetDefinition(name, value);
|
this->Internal->SetDefinition(name, value);
|
||||||
if (!this->Internal->VarUsageStack.empty() &&
|
if (this->VariableInitialized(name))
|
||||||
this->VariableInitialized(name))
|
|
||||||
{
|
{
|
||||||
this->CheckForUnused("changing definition", name);
|
this->CheckForUnused("changing definition", name);
|
||||||
this->Internal->VarUsageStack.top().erase(name);
|
this->Internal->VarUsageStack.top().erase(name);
|
||||||
@@ -1806,8 +1805,7 @@ void cmMakefile::AddCacheDefinition(const std::string& name, const char* value,
|
|||||||
void cmMakefile::AddDefinition(const std::string& name, bool value)
|
void cmMakefile::AddDefinition(const std::string& name, bool value)
|
||||||
{
|
{
|
||||||
this->Internal->SetDefinition(name, value ? "ON" : "OFF");
|
this->Internal->SetDefinition(name, value ? "ON" : "OFF");
|
||||||
if (!this->Internal->VarUsageStack.empty() &&
|
if (this->VariableInitialized(name))
|
||||||
this->VariableInitialized(name))
|
|
||||||
{
|
{
|
||||||
this->CheckForUnused("changing definition", name);
|
this->CheckForUnused("changing definition", name);
|
||||||
this->Internal->VarUsageStack.top().erase(name);
|
this->Internal->VarUsageStack.top().erase(name);
|
||||||
@@ -1904,8 +1902,7 @@ void cmMakefile::CheckForUnused(const char* reason,
|
|||||||
void cmMakefile::RemoveDefinition(const std::string& name)
|
void cmMakefile::RemoveDefinition(const std::string& name)
|
||||||
{
|
{
|
||||||
this->Internal->RemoveDefinition(name);
|
this->Internal->RemoveDefinition(name);
|
||||||
if (!this->Internal->VarUsageStack.empty() &&
|
if (this->VariableInitialized(name))
|
||||||
this->VariableInitialized(name))
|
|
||||||
{
|
{
|
||||||
this->CheckForUnused("unsetting", name);
|
this->CheckForUnused("unsetting", name);
|
||||||
this->Internal->VarUsageStack.top().erase(name);
|
this->Internal->VarUsageStack.top().erase(name);
|
||||||
|
|||||||
Reference in New Issue
Block a user