aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/field_mask.pb.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/field_mask.pb.cc')
-rw-r--r--src/google/protobuf/field_mask.pb.cc63
1 files changed, 39 insertions, 24 deletions
diff --git a/src/google/protobuf/field_mask.pb.cc b/src/google/protobuf/field_mask.pb.cc
index 5b29d247..afc3db56 100644
--- a/src/google/protobuf/field_mask.pb.cc
+++ b/src/google/protobuf/field_mask.pb.cc
@@ -19,7 +19,10 @@
namespace google {
namespace protobuf {
-class FieldMaskDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<FieldMask> {
+class FieldMaskDefaultTypeInternal {
+public:
+ ::google::protobuf::internal::ExplicitlyConstructed<FieldMask>
+ _instance;
} _FieldMask_default_instance_;
namespace protobuf_google_2fprotobuf_2ffield_5fmask_2eproto {
@@ -32,20 +35,20 @@ namespace {
} // namespace
PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTableField
- const TableStruct::entries[] = {
+ const TableStruct::entries[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
{0, 0, 0, ::google::protobuf::internal::kInvalidMask, 0, 0},
};
PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::AuxillaryParseTableField
- const TableStruct::aux[] = {
+ const TableStruct::aux[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
::google::protobuf::internal::AuxillaryParseTableField(),
};
PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTable const
- TableStruct::schema[] = {
- { NULL, NULL, 0, -1, -1, false },
+ TableStruct::schema[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
+ { NULL, NULL, 0, -1, -1, -1, -1, NULL, false },
};
-const ::google::protobuf::uint32 TableStruct::offsets[] = {
+const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
~0u, // no _has_bits_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldMask, _internal_metadata_),
~0u, // no _extensions_
@@ -53,8 +56,7 @@ const ::google::protobuf::uint32 TableStruct::offsets[] = {
~0u, // no _weak_field_map_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldMask, paths_),
};
-
-static const ::google::protobuf::internal::MigrationSchema schemas[] = {
+static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
{ 0, -1, sizeof(FieldMask)},
};
@@ -84,18 +86,13 @@ void protobuf_RegisterTypes(const ::std::string&) {
}
} // namespace
-
-void TableStruct::Shutdown() {
- _FieldMask_default_instance_.Shutdown();
- delete file_level_metadata[0].reflection;
-}
-
void TableStruct::InitDefaultsImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
::google::protobuf::internal::InitProtobufDefaults();
- _FieldMask_default_instance_.DefaultConstruct();
-}
+ _FieldMask_default_instance_._instance.DefaultConstruct();
+ ::google::protobuf::internal::OnShutdownDestroyMessage(
+ &_FieldMask_default_instance_);}
void InitDefaults() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
@@ -104,7 +101,7 @@ void InitDefaults() {
namespace {
void AddDescriptorsImpl() {
InitDefaults();
- static const char descriptor[] = {
+ static const char descriptor[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
"\n google/protobuf/field_mask.proto\022\017goog"
"le.protobuf\"\032\n\tFieldMask\022\r\n\005paths\030\001 \003(\tB"
"\211\001\n\023com.google.protobufB\016FieldMaskProtoP"
@@ -116,7 +113,6 @@ void AddDescriptorsImpl() {
descriptor, 227);
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"google/protobuf/field_mask.proto", &protobuf_RegisterTypes);
- ::google::protobuf::internal::OnShutdown(&TableStruct::Shutdown);
}
} // anonymous namespace
@@ -194,7 +190,12 @@ FieldMask* FieldMask::New(::google::protobuf::Arena* arena) const {
void FieldMask::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.FieldMask)
+ ::google::protobuf::uint32 cached_has_bits = 0;
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
paths_.Clear();
+ _internal_metadata_.Clear();
}
bool FieldMask::MergePartialFromCodedStream(
@@ -210,7 +211,7 @@ bool FieldMask::MergePartialFromCodedStream(
// repeated string paths = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(10u)) {
+ static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->add_paths()));
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
@@ -226,12 +227,11 @@ bool FieldMask::MergePartialFromCodedStream(
default: {
handle_unusual:
- if (tag == 0 ||
- ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
+ if (tag == 0) {
goto success;
}
- DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
+ DO_(::google::protobuf::internal::WireFormat::SkipField(
+ input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
@@ -261,6 +261,10 @@ void FieldMask::SerializeWithCachedSizes(
1, this->paths(i), output);
}
+ if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
+ }
// @@protoc_insertion_point(serialize_end:google.protobuf.FieldMask)
}
@@ -281,6 +285,10 @@ void FieldMask::SerializeWithCachedSizes(
WriteStringToArray(1, this->paths(i), target);
}
+ if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
+ }
// @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FieldMask)
return target;
}
@@ -289,6 +297,11 @@ size_t FieldMask::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.FieldMask)
size_t total_size = 0;
+ if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+ total_size +=
+ ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
+ (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
+ }
// repeated string paths = 1;
total_size += 1 *
::google::protobuf::internal::FromIntSize(this->paths_size());
@@ -352,8 +365,10 @@ void FieldMask::Swap(FieldMask* other) {
InternalSwap(other);
}
void FieldMask::InternalSwap(FieldMask* other) {
+ using std::swap;
paths_.InternalSwap(&other->paths_);
- std::swap(_cached_size_, other->_cached_size_);
+ _internal_metadata_.Swap(&other->_internal_metadata_);
+ swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata FieldMask::GetMetadata() const {