Skip to content

Commit aa34e0e

Browse files
jhumpmkruskal-google
authored andcommitted
JSON -> Json
1 parent b23b387 commit aa34e0e

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/google/protobuf/descriptor.cc

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3865,9 +3865,9 @@ class DescriptorBuilder {
38653865
const ServiceDescriptor* parent, MethodDescriptor* result,
38663866
internal::FlatAllocator& alloc);
38673867

3868-
void CheckFieldJSONNameUniqueness(const DescriptorProto& proto,
3868+
void CheckFieldJsonNameUniqueness(const DescriptorProto& proto,
38693869
const Descriptor* result);
3870-
void CheckFieldJSONNameUniqueness(std::string message_name,
3870+
void CheckFieldJsonNameUniqueness(std::string message_name,
38713871
const DescriptorProto& message,
38723872
bool is_proto2, bool use_custom_names);
38733873
void CheckEnumValueUniqueness(const EnumDescriptorProto& proto,
@@ -5428,7 +5428,7 @@ void DescriptorBuilder::BuildMessage(const DescriptorProto& proto,
54285428
}
54295429
}
54305430

5431-
CheckFieldJSONNameUniqueness(proto, result);
5431+
CheckFieldJsonNameUniqueness(proto, result);
54325432

54335433
// Check that fields aren't using reserved names or numbers and that they
54345434
// aren't using extension numbers.
@@ -5496,7 +5496,7 @@ void DescriptorBuilder::BuildMessage(const DescriptorProto& proto,
54965496
}
54975497
}
54985498

5499-
std::string GetJSONName(const FieldDescriptorProto& field, bool use_custom, bool* was_custom) {
5499+
std::string GetJsonName(const FieldDescriptorProto& field, bool use_custom, bool* was_custom) {
55005500
if (use_custom && field.has_json_name()) {
55015501
*was_custom = true;
55025502
return field.json_name();
@@ -5505,28 +5505,28 @@ std::string GetJSONName(const FieldDescriptorProto& field, bool use_custom, bool
55055505
return ToJsonName(field.name());
55065506
}
55075507

5508-
void DescriptorBuilder::CheckFieldJSONNameUniqueness(
5508+
void DescriptorBuilder::CheckFieldJsonNameUniqueness(
55095509
const DescriptorProto& proto, const Descriptor* result) {
55105510
bool is_proto2 = result->file()->syntax() == FileDescriptor::SYNTAX_PROTO2;
55115511
std::string message_name = result->full_name();
55125512
// two passes: one looking only at default JSON names, and one that considers custom JSON names
5513-
CheckFieldJSONNameUniqueness(message_name, proto, is_proto2, false);
5514-
CheckFieldJSONNameUniqueness(message_name, proto, is_proto2, true);
5513+
CheckFieldJsonNameUniqueness(message_name, proto, is_proto2, false);
5514+
CheckFieldJsonNameUniqueness(message_name, proto, is_proto2, true);
55155515
}
55165516

5517-
struct JSONNameDetails {
5517+
struct JsonNameDetails {
55185518
const FieldDescriptorProto* field;
55195519
std::string orig_name;
55205520
bool is_custom;
55215521
};
55225522

5523-
void DescriptorBuilder::CheckFieldJSONNameUniqueness(
5523+
void DescriptorBuilder::CheckFieldJsonNameUniqueness(
55245524
std::string message_name,const DescriptorProto& message, bool is_proto2, bool use_custom_names) {
55255525

5526-
std::map<std::string, struct JSONNameDetails> name_to_field;
5526+
std::map<std::string, JsonNameDetails> name_to_field;
55275527
for (int i = 0; i < message.field_size(); ++i) {
55285528
bool is_custom;
5529-
std::string name = GetJSONName(message.field(i), use_custom_names, &is_custom);
5529+
std::string name = GetJsonName(message.field(i), use_custom_names, &is_custom);
55305530
std::string lowercase_name = absl::AsciiStrToLower(name);
55315531
auto existing = name_to_field.find(lowercase_name);
55325532
if (existing != name_to_field.end()) {
@@ -5559,7 +5559,7 @@ void DescriptorBuilder::CheckFieldJSONNameUniqueness(
55595559
DescriptorPool::ErrorCollector::NAME, error_message);
55605560
}
55615561
} else {
5562-
struct JSONNameDetails details = { &message.field(i), name, is_custom };
5562+
JsonNameDetails details = { &message.field(i), name, is_custom };
55635563
name_to_field[lowercase_name] = details;
55645564
}
55655565
}

0 commit comments

Comments
 (0)