mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Use const-references in lots of places (preformance-unnecessary-value-param)
This commit is contained in:
parent
92afe64525
commit
5a237d3a3f
27 changed files with 89 additions and 89 deletions
|
@ -41,7 +41,7 @@ public:
|
|||
* @param args an \c AnalyzerArgs record.
|
||||
* @return pointer to an analyzer instance, or a null pointer if not found.
|
||||
*/
|
||||
Analyzer* Find(file_analysis::Tag tag, RecordVal* args);
|
||||
Analyzer* Find(const file_analysis::Tag& tag, RecordVal* args);
|
||||
|
||||
/**
|
||||
* Attach an analyzer to #file immediately.
|
||||
|
@ -49,7 +49,7 @@ public:
|
|||
* @param args an \c AnalyzerArgs value which specifies an analyzer.
|
||||
* @return true if analyzer was instantiated/attached, else false.
|
||||
*/
|
||||
bool Add(file_analysis::Tag tag, RecordVal* args);
|
||||
bool Add(const file_analysis::Tag& tag, RecordVal* args);
|
||||
|
||||
/**
|
||||
* Queue the attachment of an analyzer to #file.
|
||||
|
@ -58,7 +58,7 @@ public:
|
|||
* @return if successful, a pointer to a newly instantiated analyzer else
|
||||
* a null pointer. The caller does *not* take ownership of the memory.
|
||||
*/
|
||||
file_analysis::Analyzer* QueueAdd(file_analysis::Tag tag, RecordVal* args);
|
||||
file_analysis::Analyzer* QueueAdd(const file_analysis::Tag& tag, RecordVal* args);
|
||||
|
||||
/**
|
||||
* Remove an analyzer from #file immediately.
|
||||
|
@ -66,7 +66,7 @@ public:
|
|||
* @param args an \c AnalyzerArgs value which specifies an analyzer.
|
||||
* @return false if analyzer didn't exist and so wasn't removed, else true.
|
||||
*/
|
||||
bool Remove(file_analysis::Tag tag, RecordVal* args);
|
||||
bool Remove(const file_analysis::Tag& tag, RecordVal* args);
|
||||
|
||||
/**
|
||||
* Queue the removal of an analyzer from #file.
|
||||
|
@ -74,7 +74,7 @@ public:
|
|||
* @param args an \c AnalyzerArgs value which specifies an analyzer.
|
||||
* @return true if analyzer exists at time of call, else false;
|
||||
*/
|
||||
bool QueueRemove(file_analysis::Tag tag, RecordVal* args);
|
||||
bool QueueRemove(const file_analysis::Tag& tag, RecordVal* args);
|
||||
|
||||
/**
|
||||
* Perform all queued modifications to the current analyzer set.
|
||||
|
@ -107,7 +107,7 @@ protected:
|
|||
* @param args an \c AnalyzerArgs value which specifies an analyzer.
|
||||
* @return the hash key calculated from \a args
|
||||
*/
|
||||
HashKey* GetKey(file_analysis::Tag tag, RecordVal* args) const;
|
||||
HashKey* GetKey(const file_analysis::Tag& tag, RecordVal* args) const;
|
||||
|
||||
/**
|
||||
* Create an instance of a file analyzer.
|
||||
|
@ -115,7 +115,7 @@ protected:
|
|||
* @param args an \c AnalyzerArgs value which specifies an analyzer.
|
||||
* @return a new file analyzer instance.
|
||||
*/
|
||||
file_analysis::Analyzer* InstantiateAnalyzer(file_analysis::Tag tag,
|
||||
file_analysis::Analyzer* InstantiateAnalyzer(const file_analysis::Tag& tag,
|
||||
RecordVal* args) const;
|
||||
|
||||
/**
|
||||
|
@ -131,7 +131,7 @@ protected:
|
|||
* just used for debugging messages.
|
||||
* @param key the hash key which represents the analyzer's \c AnalyzerArgs.
|
||||
*/
|
||||
bool Remove(file_analysis::Tag tag, HashKey* key);
|
||||
bool Remove(const file_analysis::Tag& tag, HashKey* key);
|
||||
|
||||
private:
|
||||
|
||||
|
@ -190,7 +190,7 @@ private:
|
|||
* @param arg_a an analyzer instance to add to an analyzer set.
|
||||
* @param arg_key hash key representing the analyzer's \c AnalyzerArgs.
|
||||
*/
|
||||
RemoveMod(file_analysis::Tag arg_tag, HashKey* arg_key)
|
||||
RemoveMod(const file_analysis::Tag& arg_tag, HashKey* arg_key)
|
||||
: Modification(), tag(arg_tag), key(arg_key) {}
|
||||
~RemoveMod() override {}
|
||||
bool Perform(AnalyzerSet* set) override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue