Check for unused variables in the dtor

This commit is contained in:
Ben Boeckel 2010-09-16 16:05:59 -04:00
parent 91c4c9921c
commit 05cb0f4daf
1 changed files with 9 additions and 0 deletions

View File

@ -178,6 +178,15 @@ bool cmMakefile::NeedCacheCompatibility(int major, int minor)
cmMakefile::~cmMakefile() cmMakefile::~cmMakefile()
{ {
std::set<cmStdString> usage = this->Internal->VarUsageStack.top();
std::set<cmStdString>::const_iterator it = usage.begin();
for (; it != usage.end(); ++it)
{
if (!this->VariableUsed(it->c_str()))
{
this->CheckForUnused("out of scope", it->c_str());
}
}
for(std::vector<cmInstallGenerator*>::iterator for(std::vector<cmInstallGenerator*>::iterator
i = this->InstallGenerators.begin(); i = this->InstallGenerators.begin();
i != this->InstallGenerators.end(); ++i) i != this->InstallGenerators.end(); ++i)