Skip to content

Commit

Permalink
Revert "Update signatures of UTF-8 string functions to accept size_t …
Browse files Browse the repository at this point in the history
…type sizes"

This reverts commit 911e304.
  • Loading branch information
EFanZh authored and acozzette committed Sep 30, 2019
1 parent 00325ed commit 0d1d92d
Show file tree
Hide file tree
Showing 18 changed files with 100 additions and 100 deletions.
2 changes: 1 addition & 1 deletion src/google/protobuf/any.pb.cc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions src/google/protobuf/api.pb.cc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/google/protobuf/compiler/cpp/cpp_message.cc
Expand Up @@ -1030,7 +1030,7 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) {
format(
" static bool ValidateKey(std::string* s) {\n"
" return ::$proto_ns$::internal::WireFormatLite::"
"VerifyUtf8String(s->data(), s->size(), "
"VerifyUtf8String(s->data(), static_cast<int>(s->size()), "
"::$proto_ns$::internal::WireFormatLite::PARSE, \"$1$\");\n"
" }\n",
descriptor_->field(0)->full_name());
Expand All @@ -1040,7 +1040,7 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) {
" static bool ValidateKey(std::string* s) {\n"
"#ifndef NDEBUG\n"
" ::$proto_ns$::internal::WireFormatLite::VerifyUtf8String(\n"
" s->data(), s->size(), ::$proto_ns$::internal::"
" s->data(), static_cast<int>(s->size()), ::$proto_ns$::internal::"
"WireFormatLite::PARSE, \"$1$\");\n"
"#endif\n"
" return true;\n"
Expand All @@ -1056,7 +1056,7 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) {
format(
" static bool ValidateValue(std::string* s) {\n"
" return ::$proto_ns$::internal::WireFormatLite::"
"VerifyUtf8String(s->data(), s->size(), "
"VerifyUtf8String(s->data(), static_cast<int>(s->size()), "
"::$proto_ns$::internal::WireFormatLite::PARSE, \"$1$\");\n"
" }\n",
descriptor_->field(1)->full_name());
Expand All @@ -1066,7 +1066,7 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) {
" static bool ValidateValue(std::string* s) {\n"
"#ifndef NDEBUG\n"
" ::$proto_ns$::internal::WireFormatLite::VerifyUtf8String(\n"
" s->data(), s->size(), ::$proto_ns$::internal::"
" s->data(), static_cast<int>(s->size()), ::$proto_ns$::internal::"
"WireFormatLite::PARSE, \"$1$\");\n"
"#endif\n"
" return true;\n"
Expand Down
14 changes: 7 additions & 7 deletions src/google/protobuf/compiler/plugin.pb.cc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0d1d92d

Please sign in to comment.