@@ -406,7 +406,7 @@ std::string GetMessagesFileName(const GeneratorOptions& options, const SCC* scc,
406
406
GetSnakeFilename (scc->GetRepresentative ()->file ()->name ()));
407
407
(*long_name_dict)[scc->GetRepresentative ()] =
408
408
StrCat (snake_name, " _long_sccs_" ,
409
- static_cast <uint64 >((*long_name_dict).size ()));
409
+ static_cast <uint64_t >((*long_name_dict).size ()));
410
410
}
411
411
filename_base = (*long_name_dict)[scc->GetRepresentative ()];
412
412
}
@@ -575,7 +575,7 @@ std::string JSOneofIndex(const OneofDescriptor* oneof) {
575
575
}
576
576
577
577
// Decodes a codepoint in \x0000 -- \xFFFF.
578
- uint16 DecodeUTF8Codepoint (uint8 * bytes, size_t * length) {
578
+ uint16_t DecodeUTF8Codepoint (uint8_t * bytes, size_t * length) {
579
579
if (*length == 0 ) {
580
580
return 0 ;
581
581
}
@@ -620,13 +620,13 @@ uint16 DecodeUTF8Codepoint(uint8* bytes, size_t* length) {
620
620
bool EscapeJSString (const std::string& in, std::string* out) {
621
621
size_t decoded = 0 ;
622
622
for (size_t i = 0 ; i < in.size (); i += decoded) {
623
- uint16 codepoint = 0 ;
623
+ uint16_t codepoint = 0 ;
624
624
// Decode the next UTF-8 codepoint.
625
625
size_t have_bytes = in.size () - i;
626
- uint8 bytes[3 ] = {
627
- static_cast <uint8 >(in[i]),
628
- static_cast <uint8 >(((i + 1 ) < in.size ()) ? in[i + 1 ] : 0 ),
629
- static_cast <uint8 >(((i + 2 ) < in.size ()) ? in[i + 2 ] : 0 ),
626
+ uint8_t bytes[3 ] = {
627
+ static_cast <uint8_t >(in[i]),
628
+ static_cast <uint8_t >(((i + 1 ) < in.size ()) ? in[i + 1 ] : 0 ),
629
+ static_cast <uint8_t >(((i + 2 ) < in.size ()) ? in[i + 2 ] : 0 ),
630
630
};
631
631
codepoint = DecodeUTF8Codepoint (bytes, &have_bytes);
632
632
if (have_bytes == 0 ) {
@@ -814,13 +814,13 @@ std::string JSFieldDefault(const FieldDescriptor* field) {
814
814
// integer values as signed integer values. In order to exactly match the
815
815
// output, we need to reinterpret as base-2 signed. Ugh.
816
816
return MaybeNumberString (
817
- field, StrCat (static_cast <int32 >(field->default_value_uint32 ())));
817
+ field, StrCat (static_cast <int32_t >(field->default_value_uint32 ())));
818
818
case FieldDescriptor::CPPTYPE_INT64:
819
819
return MaybeNumberString (field, StrCat (field->default_value_int64 ()));
820
820
case FieldDescriptor::CPPTYPE_UINT64:
821
821
// See above note for uint32 -- reinterpreting as signed.
822
822
return MaybeNumberString (
823
- field, StrCat (static_cast <int64 >(field->default_value_uint64 ())));
823
+ field, StrCat (static_cast <int64_t >(field->default_value_uint64 ())));
824
824
case FieldDescriptor::CPPTYPE_ENUM:
825
825
return StrCat (field->default_value_enum ()->number ());
826
826
case FieldDescriptor::CPPTYPE_BOOL:
0 commit comments