Skip to content

Commit

Permalink
Fix redundant StrCat calls.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 432502436
  • Loading branch information
bgogul authored and arcs-c3po committed Mar 4, 2022
1 parent b887881 commit e140799
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/ir/auth_logic/souffle_emitter.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,14 @@ class SouffleEmitter {
std::string EmitOutputs(const datalog::DLIRProgram& program) {
return absl::StrJoin(program.outputs(), "\n",
[](std::string* out, const std::string& prog_out) {
return absl::StrAppend(
out, absl::StrCat(".output ", prog_out));
return absl::StrAppend(out, ".output ", prog_out);
});
}

std::string EmitDeclaration(const datalog::Predicate& predicate) {
std::string arguments = absl::StrJoin(
predicate.args(), ", ", [](std::string* out, const std::string& arg) {
return absl::StrAppend(out, absl::StrCat(arg, ": symbol"));
return absl::StrAppend(out, arg, ": symbol");
});
return absl::StrCat(".decl ", predicate.name(), "(", arguments, ")");
}
Expand Down

0 comments on commit e140799

Please sign in to comment.