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>
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;
Node d_formula;
public:
DefinedFunction() {}
- DefinedFunction(Node func, vector<Node> formals, Node formula) :
- d_func(func),
- d_formals(formals),
- d_formula(formula) {
+ DefinedFunction(Node func, vector<Node>& formals, Node formula)
+ : d_func(func), d_formals(formals), d_formula(formula)
+ {
}
Node getFunction() const { return d_func; }
vector<Node> getFormals() const { return d_formals; }
return new_conflict;
}
-
-void DebugPrintInstantiations(const std::vector< std::vector<ArgsVec> >& instantiations,
- const std::vector<TNode> functions) {
+void DebugPrintInstantiations(
+ const std::vector<std::vector<ArgsVec> >& instantiations,
+ const std::vector<TNode>& functions)
+{
// print header
Debug("bv-abstraction-dbg") <<"[ ";
for (unsigned i = 0; i < functions.size(); ++i) {