mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 08:38:20 +00:00
Change file_analysis::File::GetID() to return const-ref
This commit is contained in:
parent
8a3cd4c65b
commit
27c3c207e4
2 changed files with 2 additions and 2 deletions
|
@ -74,7 +74,7 @@ public:
|
|||
/**
|
||||
* @return value of the "id" field from #val record.
|
||||
*/
|
||||
std::string GetID() const { return id; }
|
||||
const std::string& GetID() const { return id; }
|
||||
|
||||
/**
|
||||
* @return value of "last_active" field in #val record;
|
||||
|
|
|
@ -396,10 +396,10 @@ bool Manager::RemoveFile(const string& file_id)
|
|||
DBG_LOG(DBG_FILE_ANALYSIS, "[%s] Remove file", file_id.c_str());
|
||||
|
||||
f->EndOfFile();
|
||||
delete f;
|
||||
|
||||
id_map.erase(file_id);
|
||||
ignored.erase(file_id);
|
||||
delete f;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue