mirror of
https://github.com/zeek/zeek.git
synced 2025-10-11 19:18:19 +00:00
Improve Reporter weird-sampling-whitelist getters/setters
- getter methods return const-ref - setter methods pass by value and std::move() - ranged-for loops over the whitelists access by const-ref
This commit is contained in:
parent
260895fcb1
commit
e37baf09c0
2 changed files with 10 additions and 10 deletions
|
@ -175,7 +175,7 @@ public:
|
|||
/**
|
||||
* Gets the weird sampling whitelist.
|
||||
*/
|
||||
WeirdSet GetWeirdSamplingWhitelist() const
|
||||
const WeirdSet& GetWeirdSamplingWhitelist() const
|
||||
{
|
||||
return weird_sampling_whitelist;
|
||||
}
|
||||
|
@ -185,15 +185,15 @@ public:
|
|||
*
|
||||
* @param weird_sampling_whitelist New weird sampling whitelist.
|
||||
*/
|
||||
void SetWeirdSamplingWhitelist(const WeirdSet& weird_sampling_whitelist)
|
||||
void SetWeirdSamplingWhitelist(WeirdSet weird_sampling_whitelist)
|
||||
{
|
||||
this->weird_sampling_whitelist = weird_sampling_whitelist;
|
||||
this->weird_sampling_whitelist = std::move(weird_sampling_whitelist);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the weird sampling global list.
|
||||
*/
|
||||
WeirdSet GetWeirdSamplingGlobalList() const
|
||||
const WeirdSet& GetWeirdSamplingGlobalList() const
|
||||
{
|
||||
return weird_sampling_global_list;
|
||||
}
|
||||
|
@ -203,9 +203,9 @@ public:
|
|||
*
|
||||
* @param weird_sampling_global list New weird sampling global list.
|
||||
*/
|
||||
void SetWeirdSamplingGlobalList(const WeirdSet& weird_sampling_global_list)
|
||||
void SetWeirdSamplingGlobalList(WeirdSet weird_sampling_global_list)
|
||||
{
|
||||
this->weird_sampling_global_list = weird_sampling_global_list;
|
||||
this->weird_sampling_global_list = std::move(weird_sampling_global_list);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue