@@ -105,7 +105,7 @@ std::set<std::string> getWitnessVariables(
105105 M update;
106106 aggregatorlessClause->apply (update);
107107 auto groundingAtom = mk<Atom>(QualifiedName::fromString (" +grounding_atom" ));
108- for (std::string variableName : update.getAggregatorVariables ()) {
108+ for (const std::string& variableName : update.getAggregatorVariables ()) {
109109 groundingAtom->addArgument (mk<Variable>(variableName));
110110 }
111111 aggregatorlessClause->addToBody (std::move (groundingAtom));
@@ -163,7 +163,7 @@ std::set<std::string> getVariablesOutsideAggregate(const Clause& clause, const A
163163 return variablesOutsideAggregate;
164164}
165165
166- std::string findUniqueVariableName (const Clause& clause, std::string base) {
166+ std::string findUniqueVariableName (const Clause& clause, const std::string& base) {
167167 std::set<std::string> variablesInClause;
168168 visit (clause, [&](const Variable& v) { variablesInClause.insert (v.getName ()); });
169169 int varNum = 0 ;
@@ -174,7 +174,7 @@ std::string findUniqueVariableName(const Clause& clause, std::string base) {
174174 return candidate;
175175}
176176
177- std::string findUniqueRelationName (const Program& program, std::string base) {
177+ std::string findUniqueRelationName (const Program& program, const std::string& base) {
178178 int counter = 0 ;
179179 auto candidate = base;
180180 while (program.getRelation (QualifiedName::fromString (candidate)) != nullptr ) {
@@ -331,7 +331,7 @@ std::set<std::string> getInjectedVariables(
331331 tweakedClause->apply (update);
332332 // the update will now tell us which variables we need to ground!
333333 auto groundingAtom = mk<Atom>(QualifiedName::fromString (" +grounding_atom" ));
334- for (std::string variableName : update.getAggregatorVariables ()) {
334+ for (const std::string& variableName : update.getAggregatorVariables ()) {
335335 groundingAtom->addArgument (mk<Variable>(variableName));
336336 }
337337 // add the newly created grounding atom to the body
0 commit comments