Various smalle tweaks in preparation for merging.

This commit is contained in:
Robin Sommer 2013-05-10 19:20:27 -07:00
parent ec50cad9db
commit 7610aa31b6
26 changed files with 236 additions and 129 deletions

View file

@ -1,3 +1,5 @@
// See the file "COPYING" in the main distribution directory for copyright.
#include "AnalyzerSet.h"
#include "File.h"
#include "Analyzer.h"
@ -39,6 +41,7 @@ AnalyzerSet::~AnalyzerSet()
delete mod;
mod_queue.pop();
}
delete analyzer_hash;
}
@ -108,6 +111,7 @@ bool AnalyzerSet::Remove(FA_Tag tag, HashKey* key)
{
file_analysis::Analyzer* a =
(file_analysis::Analyzer*) analyzer_map.Remove(key);
delete key;
if ( ! a )
@ -119,6 +123,7 @@ bool AnalyzerSet::Remove(FA_Tag tag, HashKey* key)
DBG_LOG(DBG_FILE_ANALYSIS, "Remove analyzer %d for file id %s", a->Tag(),
file->GetID().c_str());
delete a;
return true;
}
@ -143,6 +148,7 @@ HashKey* AnalyzerSet::GetKey(const RecordVal* args) const
HashKey* key = analyzer_hash->ComputeHash(args, 1);
if ( ! key )
reporter->InternalError("AnalyzerArgs type mismatch");
return key;
}
@ -172,7 +178,8 @@ void AnalyzerSet::Insert(file_analysis::Analyzer* a, HashKey* key)
void AnalyzerSet::DrainModifications()
{
if ( mod_queue.empty() ) return;
if ( mod_queue.empty() )
return;
DBG_LOG(DBG_FILE_ANALYSIS, "Start analyzer mod queue flush of file id %s",
file->GetID().c_str());