commit | 2e4df45c0393f6ca0fd3efdf8205f5c400afff2f | [log] [tgz] |
---|---|---|
author | Ryan Savitski <rsavitski@google.com> | Thu May 25 17:11:46 2023 +0100 |
committer | Ryan Savitski <rsavitski@google.com> | Thu May 25 17:11:46 2023 +0100 |
tree | 6c51364471e5227e4709308cc9c331ba87938670 | |
parent | 603af5820895ff5b344fd8b2b7e90a5336f2de30 [diff] |
proto_merger: comma-delimit >1 field options Change-Id: Ifdf201147b603cc2ffb493504688fc581428fadc
diff --git a/src/tools/proto_merger/proto_file_serializer.cc b/src/tools/proto_merger/proto_file_serializer.cc index dca5a07..c94a101 100644 --- a/src/tools/proto_merger/proto_file_serializer.cc +++ b/src/tools/proto_merger/proto_file_serializer.cc
@@ -70,8 +70,11 @@ std::string output; output += " ["; - for (const auto& option : options) { - output += option.key + " = " + option.value; + size_t n = options.size(); + for (size_t i = 0; i < n; i++) { + output += options[i].key + " = " + options[i].value; + if (i != n - 1) + output += ", "; } output += "]"; return output;