aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/type.pb.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/type.pb.cc')
-rw-r--r--src/google/protobuf/type.pb.cc96
1 files changed, 67 insertions, 29 deletions
diff --git a/src/google/protobuf/type.pb.cc b/src/google/protobuf/type.pb.cc
index 50d7be43..8bf57ecf 100644
--- a/src/google/protobuf/type.pb.cc
+++ b/src/google/protobuf/type.pb.cc
@@ -486,7 +486,8 @@ bool Type::MergePartialFromCodedStream(
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// string name = 1;
case 1: {
- if (tag == 10u) {
+ if (static_cast<::google::protobuf::uint8>(tag) ==
+ static_cast<::google::protobuf::uint8>(10u)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_name()));
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
@@ -501,7 +502,8 @@ bool Type::MergePartialFromCodedStream(
// repeated .google.protobuf.Field fields = 2;
case 2: {
- if (tag == 18u) {
+ if (static_cast<::google::protobuf::uint8>(tag) ==
+ static_cast<::google::protobuf::uint8>(18u)) {
DO_(input->IncrementRecursionDepth());
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
input, add_fields()));
@@ -514,7 +516,8 @@ bool Type::MergePartialFromCodedStream(
// repeated string oneofs = 3;
case 3: {
- if (tag == 26u) {
+ if (static_cast<::google::protobuf::uint8>(tag) ==
+ static_cast<::google::protobuf::uint8>(26u)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->add_oneofs()));
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
@@ -530,7 +533,8 @@ bool Type::MergePartialFromCodedStream(
// repeated .google.protobuf.Option options = 4;
case 4: {
- if (tag == 34u) {
+ if (static_cast<::google::protobuf::uint8>(tag) ==
+ static_cast<::google::protobuf::uint8>(34u)) {
DO_(input->IncrementRecursionDepth());
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
input, add_options()));
@@ -543,7 +547,8 @@ bool Type::MergePartialFromCodedStream(
// .google.protobuf.SourceContext source_context = 5;
case 5: {
- if (tag == 42u) {
+ if (static_cast<::google::protobuf::uint8>(tag) ==
+ static_cast<::google::protobuf::uint8>(42u)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_source_context()));
} else {
@@ -554,7 +559,8 @@ bool Type::MergePartialFromCodedStream(
// .google.protobuf.Syntax syntax = 6;
case 6: {
- if (tag == 48u) {
+ if (static_cast<::google::protobuf::uint8>(tag) ==
+ static_cast<::google::protobuf::uint8>(48u)) {
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
@@ -607,7 +613,7 @@ void Type::SerializeWithCachedSizes(
}
// repeated string oneofs = 3;
- for (int i = 0; i < this->oneofs_size(); i++) {
+ for (int i = 0, n = this->oneofs_size(); i < n; i++) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->oneofs(i).data(), this->oneofs(i).length(),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
@@ -660,7 +666,7 @@ void Type::SerializeWithCachedSizes(
}
// repeated string oneofs = 3;
- for (int i = 0; i < this->oneofs_size(); i++) {
+ for (int i = 0, n = this->oneofs_size(); i < n; i++) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->oneofs(i).data(), this->oneofs(i).length(),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
@@ -711,7 +717,7 @@ size_t Type::ByteSizeLong() const {
// repeated string oneofs = 3;
total_size += 1 *
::google::protobuf::internal::FromIntSize(this->oneofs_size());
- for (int i = 0; i < this->oneofs_size(); i++) {
+ for (int i = 0, n = this->oneofs_size(); i < n; i++) {
total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
this->oneofs(i));
}
@@ -957,6 +963,12 @@ void Type::set_oneofs(int index, const ::std::string& value) {
// @@protoc_insertion_point(field_set:google.protobuf.Type.oneofs)
oneofs_.Mutable(index)->assign(value);
}
+#if LANG_CXX11
+void Type::set_oneofs(int index, ::std::string&& value) {
+ // @@protoc_insertion_point(field_set:google.protobuf.Type.oneofs)
+ oneofs_.Mutable(index)->assign(std::move(value));
+}
+#endif
void Type::set_oneofs(int index, const char* value) {
oneofs_.Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set_char:google.protobuf.Type.oneofs)
@@ -974,6 +986,12 @@ void Type::add_oneofs(const ::std::string& value) {
oneofs_.Add()->assign(value);
// @@protoc_insertion_point(field_add:google.protobuf.Type.oneofs)
}
+#if LANG_CXX11
+void Type::add_oneofs(::std::string&& value) {
+ oneofs_.Add()->assign(std::move(value));
+ // @@protoc_insertion_point(field_add:google.protobuf.Type.oneofs)
+}
+#endif
void Type::add_oneofs(const char* value) {
oneofs_.Add()->assign(value);
// @@protoc_insertion_point(field_add_char:google.protobuf.Type.oneofs)
@@ -1231,7 +1249,8 @@ bool Field::MergePartialFromCodedStream(
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// .google.protobuf.Field.Kind kind = 1;
case 1: {
- if (tag == 8u) {
+ if (static_cast<::google::protobuf::uint8>(tag) ==
+ static_cast<::google::protobuf::uint8>(8u)) {
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
@@ -1245,7 +1264,8 @@ bool Field::MergePartialFromCodedStream(
// .google.protobuf.Field.Cardinality cardinality = 2;
case 2: {
- if (tag == 16u) {
+ if (static_cast<::google::protobuf::uint8>(tag) ==
+ static_cast<::google::protobuf::uint8>(16u)) {
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
@@ -1259,7 +1279,8 @@ bool Field::MergePartialFromCodedStream(
// int32 number = 3;
case 3: {
- if (tag == 24u) {
+ if (static_cast<::google::protobuf::uint8>(tag) ==
+ static_cast<::google::protobuf::uint8>(24u)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
@@ -1272,7 +1293,8 @@ bool Field::MergePartialFromCodedStream(
// string name = 4;
case 4: {
- if (tag == 34u) {
+ if (static_cast<::google::protobuf::uint8>(tag) ==
+ static_cast<::google::protobuf::uint8>(34u)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_name()));
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
@@ -1287,7 +1309,8 @@ bool Field::MergePartialFromCodedStream(
// string type_url = 6;
case 6: {
- if (tag == 50u) {
+ if (static_cast<::google::protobuf::uint8>(tag) ==
+ static_cast<::google::protobuf::uint8>(50u)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_type_url()));
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
@@ -1302,7 +1325,8 @@ bool Field::MergePartialFromCodedStream(
// int32 oneof_index = 7;
case 7: {
- if (tag == 56u) {
+ if (static_cast<::google::protobuf::uint8>(tag) ==
+ static_cast<::google::protobuf::uint8>(56u)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
@@ -1315,7 +1339,8 @@ bool Field::MergePartialFromCodedStream(
// bool packed = 8;
case 8: {
- if (tag == 64u) {
+ if (static_cast<::google::protobuf::uint8>(tag) ==
+ static_cast<::google::protobuf::uint8>(64u)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
@@ -1328,7 +1353,8 @@ bool Field::MergePartialFromCodedStream(
// repeated .google.protobuf.Option options = 9;
case 9: {
- if (tag == 74u) {
+ if (static_cast<::google::protobuf::uint8>(tag) ==
+ static_cast<::google::protobuf::uint8>(74u)) {
DO_(input->IncrementRecursionDepth());
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
input, add_options()));
@@ -1341,7 +1367,8 @@ bool Field::MergePartialFromCodedStream(
// string json_name = 10;
case 10: {
- if (tag == 82u) {
+ if (static_cast<::google::protobuf::uint8>(tag) ==
+ static_cast<::google::protobuf::uint8>(82u)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_json_name()));
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
@@ -1356,7 +1383,8 @@ bool Field::MergePartialFromCodedStream(
// string default_value = 11;
case 11: {
- if (tag == 90u) {
+ if (static_cast<::google::protobuf::uint8>(tag) ==
+ static_cast<::google::protobuf::uint8>(90u)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_default_value()));
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
@@ -2267,7 +2295,8 @@ bool Enum::MergePartialFromCodedStream(
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// string name = 1;
case 1: {
- if (tag == 10u) {
+ if (static_cast<::google::protobuf::uint8>(tag) ==
+ static_cast<::google::protobuf::uint8>(10u)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_name()));
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
@@ -2282,7 +2311,8 @@ bool Enum::MergePartialFromCodedStream(
// repeated .google.protobuf.EnumValue enumvalue = 2;
case 2: {
- if (tag == 18u) {
+ if (static_cast<::google::protobuf::uint8>(tag) ==
+ static_cast<::google::protobuf::uint8>(18u)) {
DO_(input->IncrementRecursionDepth());
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
input, add_enumvalue()));
@@ -2295,7 +2325,8 @@ bool Enum::MergePartialFromCodedStream(
// repeated .google.protobuf.Option options = 3;
case 3: {
- if (tag == 26u) {
+ if (static_cast<::google::protobuf::uint8>(tag) ==
+ static_cast<::google::protobuf::uint8>(26u)) {
DO_(input->IncrementRecursionDepth());
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
input, add_options()));
@@ -2308,7 +2339,8 @@ bool Enum::MergePartialFromCodedStream(
// .google.protobuf.SourceContext source_context = 4;
case 4: {
- if (tag == 34u) {
+ if (static_cast<::google::protobuf::uint8>(tag) ==
+ static_cast<::google::protobuf::uint8>(34u)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_source_context()));
} else {
@@ -2319,7 +2351,8 @@ bool Enum::MergePartialFromCodedStream(
// .google.protobuf.Syntax syntax = 5;
case 5: {
- if (tag == 40u) {
+ if (static_cast<::google::protobuf::uint8>(tag) ==
+ static_cast<::google::protobuf::uint8>(40u)) {
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
@@ -2876,7 +2909,8 @@ bool EnumValue::MergePartialFromCodedStream(
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// string name = 1;
case 1: {
- if (tag == 10u) {
+ if (static_cast<::google::protobuf::uint8>(tag) ==
+ static_cast<::google::protobuf::uint8>(10u)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_name()));
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
@@ -2891,7 +2925,8 @@ bool EnumValue::MergePartialFromCodedStream(
// int32 number = 2;
case 2: {
- if (tag == 16u) {
+ if (static_cast<::google::protobuf::uint8>(tag) ==
+ static_cast<::google::protobuf::uint8>(16u)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
@@ -2904,7 +2939,8 @@ bool EnumValue::MergePartialFromCodedStream(
// repeated .google.protobuf.Option options = 3;
case 3: {
- if (tag == 26u) {
+ if (static_cast<::google::protobuf::uint8>(tag) ==
+ static_cast<::google::protobuf::uint8>(26u)) {
DO_(input->IncrementRecursionDepth());
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
input, add_options()));
@@ -3367,7 +3403,8 @@ bool Option::MergePartialFromCodedStream(
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// string name = 1;
case 1: {
- if (tag == 10u) {
+ if (static_cast<::google::protobuf::uint8>(tag) ==
+ static_cast<::google::protobuf::uint8>(10u)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_name()));
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
@@ -3382,7 +3419,8 @@ bool Option::MergePartialFromCodedStream(
// .google.protobuf.Any value = 2;
case 2: {
- if (tag == 18u) {
+ if (static_cast<::google::protobuf::uint8>(tag) ==
+ static_cast<::google::protobuf::uint8>(18u)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_value()));
} else {