Use const-references in lots of places (preformance-unnecessary-value-param)

This commit is contained in:
Tim Wojtulewicz 2020-02-11 14:11:18 -08:00
parent 92afe64525
commit 5a237d3a3f
27 changed files with 89 additions and 89 deletions

View file

@ -386,7 +386,7 @@ bool Manager::DisableStream(EnumVal* id)
// Helper for recursive record field unrolling.
bool Manager::TraverseRecord(Stream* stream, Filter* filter, RecordType* rt,
TableVal* include, TableVal* exclude, string path, list<int> indices)
TableVal* include, TableVal* exclude, const string& path, const list<int>& indices)
{
// Only include extensions for the outer record.
int num_ext_fields = (indices.size() == 0) ? filter->num_ext_fields : 0;
@ -676,7 +676,7 @@ bool Manager::RemoveFilter(EnumVal* id, StringVal* name)
return RemoveFilter(id, name->AsString()->CheckString());
}
bool Manager::RemoveFilter(EnumVal* id, string name)
bool Manager::RemoveFilter(EnumVal* id, const string& name)
{
Stream* stream = FindStream(id);
if ( ! stream )
@ -1259,7 +1259,7 @@ void Manager::DeleteVals(int num_fields, threading::Value** vals)
delete [] vals;
}
bool Manager::WriteFromRemote(EnumVal* id, EnumVal* writer, string path, int num_fields,
bool Manager::WriteFromRemote(EnumVal* id, EnumVal* writer, const string& path, int num_fields,
threading::Value** vals)
{
Stream* stream = FindStream(id);