diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-05-17 10:07:10 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-05-19 20:36:51 (GMT) |
commit | c42f0e2b3e7d3b8eed0ef0ab5a973fe9375339b1 (patch) | |
tree | f950a99bcf22fb5f71cff19afba241b348ef6628 /Source/cmMakefile.cxx | |
parent | caff8e5a3e03c7841a35e563c014322f26611aef (diff) | |
download | CMake-c42f0e2b3e7d3b8eed0ef0ab5a973fe9375339b1.zip CMake-c42f0e2b3e7d3b8eed0ef0ab5a973fe9375339b1.tar.gz CMake-c42f0e2b3e7d3b8eed0ef0ab5a973fe9375339b1.tar.bz2 |
cmMakefile: Remove redundant conditions.
This container is never empty.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 1eadecf..56766dc 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1730,8 +1730,7 @@ void cmMakefile::AddDefinition(const std::string& name, const char* value) } this->Internal->SetDefinition(name, value); - if (!this->Internal->VarUsageStack.empty() && - this->VariableInitialized(name)) + if (this->VariableInitialized(name)) { this->CheckForUnused("changing definition", 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) { this->Internal->SetDefinition(name, value ? "ON" : "OFF"); - if (!this->Internal->VarUsageStack.empty() && - this->VariableInitialized(name)) + if (this->VariableInitialized(name)) { this->CheckForUnused("changing definition", name); this->Internal->VarUsageStack.top().erase(name); @@ -1904,8 +1902,7 @@ void cmMakefile::CheckForUnused(const char* reason, void cmMakefile::RemoveDefinition(const std::string& name) { this->Internal->RemoveDefinition(name); - if (!this->Internal->VarUsageStack.empty() && - this->VariableInitialized(name)) + if (this->VariableInitialized(name)) { this->CheckForUnused("unsetting", name); this->Internal->VarUsageStack.top().erase(name); |