diff options
author | Piotr Trojanek <piotr.trojanek@gmail.com> | 2019-08-22 23:12:20 +0200 |
---|---|---|
committer | Andres Noetzli <andres.noetzli@gmail.com> | 2019-10-08 11:03:44 -0700 |
commit | 788212a3783affa634dc685b6f1b086f292c2528 (patch) | |
tree | 039d25735eab4d1ecae2f9ea5ffa64ae82020076 /src/expr | |
parent | 7aebe3a327f1075f1489384b7e4e2808250ae344 (diff) |
pass parameters by reference where it affects performance
Detected with cppcheck static analyser, which said: (performance) Function
parameter should be passed by reference. Reformat with clang-format as
needed.
Signed-off-by: Piotr Trojanek <piotr.trojanek@gmail.com>
Diffstat (limited to 'src/expr')
-rw-r--r-- | src/expr/record.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/expr/record.cpp b/src/expr/record.cpp index 03682c8d4..0303ff705 100644 --- a/src/expr/record.cpp +++ b/src/expr/record.cpp @@ -24,7 +24,9 @@ namespace CVC4 { -static Record::FieldVector::const_iterator find(const Record::FieldVector& fields, std::string name){ +static Record::FieldVector::const_iterator find( + const Record::FieldVector& fields, const std::string& name) +{ for(Record::FieldVector::const_iterator i = fields.begin(), i_end = fields.end(); i != i_end; ++i){ if((*i).first == name) { return i; |