Addressed PR comments.

pull/13171/head
Joshua Haberman 3 years ago
parent 9715597895
commit 992448eefe
  1. 2
      upb/def.c
  2. 2
      upbc/protoc-gen-upb.cc

@ -2403,7 +2403,7 @@ static int count_bits_debug(uint64_t x) {
static int compare_int32(const void* a_ptr, const void* b_ptr) {
int32_t a = *(int32_t*)a_ptr;
int32_t b = *(int32_t*)b_ptr;
return (a) < (b) ? -1 : ((a) == (b) ? 0 : 1);
return a < b ? -1 : (a == b ? 0 : 1);
}
upb_MiniTable_Enum* create_enumlayout(symtab_addctx* ctx,

@ -1324,7 +1324,7 @@ int WriteEnums(const protobuf::FileDescriptor* file, Output& output) {
if (!values.empty()) {
values_init = EnumInit(e) + "_values";
output("static const int32_t $0[$1] = {\n", values_init, values.size());
for (auto value : values) {
for (int32_t value : values) {
output(" $0,\n", value);
}
output("};\n\n");

Loading…
Cancel
Save