diff options
Diffstat (limited to 'src/google/protobuf/empty.pb.cc')
-rw-r--r-- | src/google/protobuf/empty.pb.cc | 70 |
1 files changed, 31 insertions, 39 deletions
diff --git a/src/google/protobuf/empty.pb.cc b/src/google/protobuf/empty.pb.cc index caa019e8..163a4f6a 100644 --- a/src/google/protobuf/empty.pb.cc +++ b/src/google/protobuf/empty.pb.cc @@ -7,7 +7,6 @@ #include <google/protobuf/stubs/common.h> #include <google/protobuf/stubs/port.h> -#include <google/protobuf/stubs/once.h> #include <google/protobuf/io/coded_stream.h> #include <google/protobuf/wire_format_lite_inl.h> #include <google/protobuf/descriptor.h> @@ -19,6 +18,7 @@ #include "third_party/protobuf/version.h" #endif // @@protoc_insertion_point(includes) + namespace google { namespace protobuf { class EmptyDefaultTypeInternal { @@ -29,14 +29,9 @@ class EmptyDefaultTypeInternal { } // namespace protobuf } // namespace google namespace protobuf_google_2fprotobuf_2fempty_2eproto { -void InitDefaultsEmptyImpl() { +static void InitDefaultsEmpty() { GOOGLE_PROTOBUF_VERIFY_VERSION; -#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS - ::google::protobuf::internal::InitProtobufDefaultsForceUnique(); -#else - ::google::protobuf::internal::InitProtobufDefaults(); -#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS { void* ptr = &::google::protobuf::_Empty_default_instance_; new (ptr) ::google::protobuf::Empty(); @@ -45,9 +40,11 @@ void InitDefaultsEmptyImpl() { ::google::protobuf::Empty::InitAsDefaultInstance(); } -void InitDefaultsEmpty() { - static GOOGLE_PROTOBUF_DECLARE_ONCE(once); - ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsEmptyImpl); +LIBPROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<0> scc_info_Empty = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsEmpty}, {}}; + +void InitDefaults() { + ::google::protobuf::internal::InitSCC(&scc_info_Empty.base); } ::google::protobuf::Metadata file_level_metadata[1]; @@ -67,17 +64,16 @@ static ::google::protobuf::Message const * const file_default_instances[] = { reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::_Empty_default_instance_), }; -void protobuf_AssignDescriptors() { +static void protobuf_AssignDescriptors() { AddDescriptors(); - ::google::protobuf::MessageFactory* factory = NULL; AssignDescriptors( - "google/protobuf/empty.proto", schemas, file_default_instances, TableStruct::offsets, factory, + "google/protobuf/empty.proto", schemas, file_default_instances, TableStruct::offsets, file_level_metadata, NULL, NULL); } -void protobuf_AssignDescriptorsOnce() { - static GOOGLE_PROTOBUF_DECLARE_ONCE(once); - ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors); +static void protobuf_AssignDescriptorsOnce() { + static ::google::protobuf::internal::once_flag once; + ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors); } void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD; @@ -86,7 +82,7 @@ void protobuf_RegisterTypes(const ::std::string&) { ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 1); } -void AddDescriptorsImpl() { +static void AddDescriptorsImpl() { InitDefaults(); static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { "\n\033google/protobuf/empty.proto\022\017google.pr" @@ -102,8 +98,8 @@ void AddDescriptorsImpl() { } void AddDescriptors() { - static GOOGLE_PROTOBUF_DECLARE_ONCE(once); - ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl); + static ::google::protobuf::internal::once_flag once; + ::google::protobuf::internal::call_once(once, AddDescriptorsImpl); } // Force AddDescriptors() to be called at dynamic initialization time. struct StaticDescriptorInitializer { @@ -124,30 +120,27 @@ void Empty::InitAsDefaultInstance() { Empty::Empty() : ::google::protobuf::Message(), _internal_metadata_(NULL) { - if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2fprotobuf_2fempty_2eproto::InitDefaultsEmpty(); - } + ::google::protobuf::internal::InitSCC( + &protobuf_google_2fprotobuf_2fempty_2eproto::scc_info_Empty.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.Empty) } Empty::Empty(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena) { - ::protobuf_google_2fprotobuf_2fempty_2eproto::InitDefaultsEmpty(); + ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2fempty_2eproto::scc_info_Empty.base); SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.Empty) } Empty::Empty(const Empty& from) : ::google::protobuf::Message(), - _internal_metadata_(NULL), - _cached_size_(0) { + _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); // @@protoc_insertion_point(copy_constructor:google.protobuf.Empty) } void Empty::SharedCtor() { - _cached_size_ = 0; } Empty::~Empty() { @@ -163,12 +156,10 @@ void Empty::ArenaDtor(void* object) { Empty* _this = reinterpret_cast< Empty* >(object); (void)_this; } -void Empty::RegisterArenaDtor(::google::protobuf::Arena* arena) { +void Empty::RegisterArenaDtor(::google::protobuf::Arena*) { } void Empty::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); + _cached_size_.Set(size); } const ::google::protobuf::Descriptor* Empty::descriptor() { ::protobuf_google_2fprotobuf_2fempty_2eproto::protobuf_AssignDescriptorsOnce(); @@ -176,13 +167,10 @@ const ::google::protobuf::Descriptor* Empty::descriptor() { } const Empty& Empty::default_instance() { - ::protobuf_google_2fprotobuf_2fempty_2eproto::InitDefaultsEmpty(); + ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2fempty_2eproto::scc_info_Empty.base); return *internal_default_instance(); } -Empty* Empty::New(::google::protobuf::Arena* arena) const { - return ::google::protobuf::Arena::CreateMessage<Empty>(arena); -} void Empty::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.Empty) @@ -199,7 +187,7 @@ bool Empty::MergePartialFromCodedStream( ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.Empty) for (;;) { - ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; handle_unusual: @@ -256,9 +244,7 @@ size_t Empty::ByteSizeLong() const { (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = cached_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); + SetCachedSize(cached_size); return total_size; } @@ -326,7 +312,6 @@ void Empty::UnsafeArenaSwap(Empty* other) { void Empty::InternalSwap(Empty* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); - swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata Empty::GetMetadata() const { @@ -338,5 +323,12 @@ void Empty::InternalSwap(Empty* other) { // @@protoc_insertion_point(namespace_scope) } // namespace protobuf } // namespace google +namespace google { +namespace protobuf { +template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::Empty* Arena::CreateMaybeMessage< ::google::protobuf::Empty >(Arena* arena) { + return Arena::CreateMessageInternal< ::google::protobuf::Empty >(arena); +} +} // namespace protobuf +} // namespace google // @@protoc_insertion_point(global_scope) |