1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // source: protos/perfetto/trace/remote_clock_sync.proto
3 
4 #include "protos/perfetto/trace/remote_clock_sync.pb.h"
5 
6 #include <algorithm>
7 #include <cstdint>
8 
9 #include <google/protobuf/io/coded_stream.h>
10 #include <google/protobuf/extension_set.h>
11 #include <google/protobuf/wire_format_lite.h>
12 #include <google/protobuf/io/zero_copy_stream_impl_lite.h>
13 // @@protoc_insertion_point(includes)
14 #include <google/protobuf/port_def.inc>
15 
16 PROTOBUF_PRAGMA_INIT_SEG
17 
18 namespace _pb = ::PROTOBUF_NAMESPACE_ID;
19 namespace _pbi = _pb::internal;
20 
21 namespace perfetto {
22 namespace protos {
RemoteClockSync_SyncedClocks(::_pbi::ConstantInitialized)23 PROTOBUF_CONSTEXPR RemoteClockSync_SyncedClocks::RemoteClockSync_SyncedClocks(
24     ::_pbi::ConstantInitialized): _impl_{
25     /*decltype(_impl_._has_bits_)*/{}
26   , /*decltype(_impl_._cached_size_)*/{}
27   , /*decltype(_impl_.client_clocks_)*/nullptr
28   , /*decltype(_impl_.host_clocks_)*/nullptr} {}
29 struct RemoteClockSync_SyncedClocksDefaultTypeInternal {
RemoteClockSync_SyncedClocksDefaultTypeInternalperfetto::protos::RemoteClockSync_SyncedClocksDefaultTypeInternal30   PROTOBUF_CONSTEXPR RemoteClockSync_SyncedClocksDefaultTypeInternal()
31       : _instance(::_pbi::ConstantInitialized{}) {}
~RemoteClockSync_SyncedClocksDefaultTypeInternalperfetto::protos::RemoteClockSync_SyncedClocksDefaultTypeInternal32   ~RemoteClockSync_SyncedClocksDefaultTypeInternal() {}
33   union {  // NOLINT(misc-non-private-member-variables-in-classes)
34     RemoteClockSync_SyncedClocks _instance;
35   };
36 };
37 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RemoteClockSync_SyncedClocksDefaultTypeInternal _RemoteClockSync_SyncedClocks_default_instance_;
RemoteClockSync(::_pbi::ConstantInitialized)38 PROTOBUF_CONSTEXPR RemoteClockSync::RemoteClockSync(
39     ::_pbi::ConstantInitialized): _impl_{
40     /*decltype(_impl_.synced_clocks_)*/{}
41   , /*decltype(_impl_._cached_size_)*/{}} {}
42 struct RemoteClockSyncDefaultTypeInternal {
RemoteClockSyncDefaultTypeInternalperfetto::protos::RemoteClockSyncDefaultTypeInternal43   PROTOBUF_CONSTEXPR RemoteClockSyncDefaultTypeInternal()
44       : _instance(::_pbi::ConstantInitialized{}) {}
~RemoteClockSyncDefaultTypeInternalperfetto::protos::RemoteClockSyncDefaultTypeInternal45   ~RemoteClockSyncDefaultTypeInternal() {}
46   union {  // NOLINT(misc-non-private-member-variables-in-classes)
47     RemoteClockSync _instance;
48   };
49 };
50 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RemoteClockSyncDefaultTypeInternal _RemoteClockSync_default_instance_;
51 }  // namespace protos
52 }  // namespace perfetto
53 namespace perfetto {
54 namespace protos {
55 
56 // ===================================================================
57 
58 class RemoteClockSync_SyncedClocks::_Internal {
59  public:
60   using HasBits = decltype(std::declval<RemoteClockSync_SyncedClocks>()._impl_._has_bits_);
61   static const ::perfetto::protos::ClockSnapshot& client_clocks(const RemoteClockSync_SyncedClocks* msg);
set_has_client_clocks(HasBits * has_bits)62   static void set_has_client_clocks(HasBits* has_bits) {
63     (*has_bits)[0] |= 1u;
64   }
65   static const ::perfetto::protos::ClockSnapshot& host_clocks(const RemoteClockSync_SyncedClocks* msg);
set_has_host_clocks(HasBits * has_bits)66   static void set_has_host_clocks(HasBits* has_bits) {
67     (*has_bits)[0] |= 2u;
68   }
69 };
70 
71 const ::perfetto::protos::ClockSnapshot&
client_clocks(const RemoteClockSync_SyncedClocks * msg)72 RemoteClockSync_SyncedClocks::_Internal::client_clocks(const RemoteClockSync_SyncedClocks* msg) {
73   return *msg->_impl_.client_clocks_;
74 }
75 const ::perfetto::protos::ClockSnapshot&
host_clocks(const RemoteClockSync_SyncedClocks * msg)76 RemoteClockSync_SyncedClocks::_Internal::host_clocks(const RemoteClockSync_SyncedClocks* msg) {
77   return *msg->_impl_.host_clocks_;
78 }
clear_client_clocks()79 void RemoteClockSync_SyncedClocks::clear_client_clocks() {
80   if (_impl_.client_clocks_ != nullptr) _impl_.client_clocks_->Clear();
81   _impl_._has_bits_[0] &= ~0x00000001u;
82 }
clear_host_clocks()83 void RemoteClockSync_SyncedClocks::clear_host_clocks() {
84   if (_impl_.host_clocks_ != nullptr) _impl_.host_clocks_->Clear();
85   _impl_._has_bits_[0] &= ~0x00000002u;
86 }
RemoteClockSync_SyncedClocks(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)87 RemoteClockSync_SyncedClocks::RemoteClockSync_SyncedClocks(::PROTOBUF_NAMESPACE_ID::Arena* arena,
88                          bool is_message_owned)
89   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
90   SharedCtor(arena, is_message_owned);
91   // @@protoc_insertion_point(arena_constructor:perfetto.protos.RemoteClockSync.SyncedClocks)
92 }
RemoteClockSync_SyncedClocks(const RemoteClockSync_SyncedClocks & from)93 RemoteClockSync_SyncedClocks::RemoteClockSync_SyncedClocks(const RemoteClockSync_SyncedClocks& from)
94   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
95   RemoteClockSync_SyncedClocks* const _this = this; (void)_this;
96   new (&_impl_) Impl_{
97       decltype(_impl_._has_bits_){from._impl_._has_bits_}
98     , /*decltype(_impl_._cached_size_)*/{}
99     , decltype(_impl_.client_clocks_){nullptr}
100     , decltype(_impl_.host_clocks_){nullptr}};
101 
102   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
103   if (from._internal_has_client_clocks()) {
104     _this->_impl_.client_clocks_ = new ::perfetto::protos::ClockSnapshot(*from._impl_.client_clocks_);
105   }
106   if (from._internal_has_host_clocks()) {
107     _this->_impl_.host_clocks_ = new ::perfetto::protos::ClockSnapshot(*from._impl_.host_clocks_);
108   }
109   // @@protoc_insertion_point(copy_constructor:perfetto.protos.RemoteClockSync.SyncedClocks)
110 }
111 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)112 inline void RemoteClockSync_SyncedClocks::SharedCtor(
113     ::_pb::Arena* arena, bool is_message_owned) {
114   (void)arena;
115   (void)is_message_owned;
116   new (&_impl_) Impl_{
117       decltype(_impl_._has_bits_){}
118     , /*decltype(_impl_._cached_size_)*/{}
119     , decltype(_impl_.client_clocks_){nullptr}
120     , decltype(_impl_.host_clocks_){nullptr}
121   };
122 }
123 
~RemoteClockSync_SyncedClocks()124 RemoteClockSync_SyncedClocks::~RemoteClockSync_SyncedClocks() {
125   // @@protoc_insertion_point(destructor:perfetto.protos.RemoteClockSync.SyncedClocks)
126   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
127   (void)arena;
128     return;
129   }
130   SharedDtor();
131 }
132 
SharedDtor()133 inline void RemoteClockSync_SyncedClocks::SharedDtor() {
134   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
135   if (this != internal_default_instance()) delete _impl_.client_clocks_;
136   if (this != internal_default_instance()) delete _impl_.host_clocks_;
137 }
138 
SetCachedSize(int size) const139 void RemoteClockSync_SyncedClocks::SetCachedSize(int size) const {
140   _impl_._cached_size_.Set(size);
141 }
142 
Clear()143 void RemoteClockSync_SyncedClocks::Clear() {
144 // @@protoc_insertion_point(message_clear_start:perfetto.protos.RemoteClockSync.SyncedClocks)
145   ::uint32_t cached_has_bits = 0;
146   // Prevent compiler warnings about cached_has_bits being unused
147   (void) cached_has_bits;
148 
149   cached_has_bits = _impl_._has_bits_[0];
150   if (cached_has_bits & 0x00000003u) {
151     if (cached_has_bits & 0x00000001u) {
152       GOOGLE_DCHECK(_impl_.client_clocks_ != nullptr);
153       _impl_.client_clocks_->Clear();
154     }
155     if (cached_has_bits & 0x00000002u) {
156       GOOGLE_DCHECK(_impl_.host_clocks_ != nullptr);
157       _impl_.host_clocks_->Clear();
158     }
159   }
160   _impl_._has_bits_.Clear();
161   _internal_metadata_.Clear<std::string>();
162 }
163 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)164 const char* RemoteClockSync_SyncedClocks::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
165 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
166   _Internal::HasBits has_bits{};
167   while (!ctx->Done(&ptr)) {
168     ::uint32_t tag;
169     ptr = ::_pbi::ReadTag(ptr, &tag);
170     switch (tag >> 3) {
171       // optional .perfetto.protos.ClockSnapshot client_clocks = 2;
172       case 2:
173         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
174           ptr = ctx->ParseMessage(_internal_mutable_client_clocks(), ptr);
175           CHK_(ptr);
176         } else {
177           goto handle_unusual;
178         }
179         continue;
180       // optional .perfetto.protos.ClockSnapshot host_clocks = 3;
181       case 3:
182         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
183           ptr = ctx->ParseMessage(_internal_mutable_host_clocks(), ptr);
184           CHK_(ptr);
185         } else {
186           goto handle_unusual;
187         }
188         continue;
189       default:
190         goto handle_unusual;
191     }  // switch
192   handle_unusual:
193     if ((tag == 0) || ((tag & 7) == 4)) {
194       CHK_(ptr);
195       ctx->SetLastTag(tag);
196       goto message_done;
197     }
198     ptr = UnknownFieldParse(
199         tag,
200         _internal_metadata_.mutable_unknown_fields<std::string>(),
201         ptr, ctx);
202     CHK_(ptr != nullptr);
203   }  // while
204 message_done:
205   _impl_._has_bits_.Or(has_bits);
206   return ptr;
207 failure:
208   ptr = nullptr;
209   goto message_done;
210 #undef CHK_
211 }
212 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const213 ::uint8_t* RemoteClockSync_SyncedClocks::_InternalSerialize(
214     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
215   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.RemoteClockSync.SyncedClocks)
216   ::uint32_t cached_has_bits = 0;
217   (void) cached_has_bits;
218 
219   cached_has_bits = _impl_._has_bits_[0];
220   // optional .perfetto.protos.ClockSnapshot client_clocks = 2;
221   if (cached_has_bits & 0x00000001u) {
222     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
223       InternalWriteMessage(2, _Internal::client_clocks(this),
224         _Internal::client_clocks(this).GetCachedSize(), target, stream);
225   }
226 
227   // optional .perfetto.protos.ClockSnapshot host_clocks = 3;
228   if (cached_has_bits & 0x00000002u) {
229     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
230       InternalWriteMessage(3, _Internal::host_clocks(this),
231         _Internal::host_clocks(this).GetCachedSize(), target, stream);
232   }
233 
234   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
235     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
236         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
237   }
238   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.RemoteClockSync.SyncedClocks)
239   return target;
240 }
241 
ByteSizeLong() const242 size_t RemoteClockSync_SyncedClocks::ByteSizeLong() const {
243 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.RemoteClockSync.SyncedClocks)
244   size_t total_size = 0;
245 
246   ::uint32_t cached_has_bits = 0;
247   // Prevent compiler warnings about cached_has_bits being unused
248   (void) cached_has_bits;
249 
250   cached_has_bits = _impl_._has_bits_[0];
251   if (cached_has_bits & 0x00000003u) {
252     // optional .perfetto.protos.ClockSnapshot client_clocks = 2;
253     if (cached_has_bits & 0x00000001u) {
254       total_size += 1 +
255         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
256           *_impl_.client_clocks_);
257     }
258 
259     // optional .perfetto.protos.ClockSnapshot host_clocks = 3;
260     if (cached_has_bits & 0x00000002u) {
261       total_size += 1 +
262         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
263           *_impl_.host_clocks_);
264     }
265 
266   }
267   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
268     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
269   }
270   int cached_size = ::_pbi::ToCachedSize(total_size);
271   SetCachedSize(cached_size);
272   return total_size;
273 }
274 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)275 void RemoteClockSync_SyncedClocks::CheckTypeAndMergeFrom(
276     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
277   MergeFrom(*::_pbi::DownCast<const RemoteClockSync_SyncedClocks*>(
278       &from));
279 }
280 
MergeFrom(const RemoteClockSync_SyncedClocks & from)281 void RemoteClockSync_SyncedClocks::MergeFrom(const RemoteClockSync_SyncedClocks& from) {
282   RemoteClockSync_SyncedClocks* const _this = this;
283   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.RemoteClockSync.SyncedClocks)
284   GOOGLE_DCHECK_NE(&from, _this);
285   ::uint32_t cached_has_bits = 0;
286   (void) cached_has_bits;
287 
288   cached_has_bits = from._impl_._has_bits_[0];
289   if (cached_has_bits & 0x00000003u) {
290     if (cached_has_bits & 0x00000001u) {
291       _this->_internal_mutable_client_clocks()->::perfetto::protos::ClockSnapshot::MergeFrom(
292           from._internal_client_clocks());
293     }
294     if (cached_has_bits & 0x00000002u) {
295       _this->_internal_mutable_host_clocks()->::perfetto::protos::ClockSnapshot::MergeFrom(
296           from._internal_host_clocks());
297     }
298   }
299   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
300 }
301 
CopyFrom(const RemoteClockSync_SyncedClocks & from)302 void RemoteClockSync_SyncedClocks::CopyFrom(const RemoteClockSync_SyncedClocks& from) {
303 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.RemoteClockSync.SyncedClocks)
304   if (&from == this) return;
305   Clear();
306   MergeFrom(from);
307 }
308 
IsInitialized() const309 bool RemoteClockSync_SyncedClocks::IsInitialized() const {
310   return true;
311 }
312 
InternalSwap(RemoteClockSync_SyncedClocks * other)313 void RemoteClockSync_SyncedClocks::InternalSwap(RemoteClockSync_SyncedClocks* other) {
314   using std::swap;
315   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
316   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
317   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
318       PROTOBUF_FIELD_OFFSET(RemoteClockSync_SyncedClocks, _impl_.host_clocks_)
319       + sizeof(RemoteClockSync_SyncedClocks::_impl_.host_clocks_)  // NOLINT
320       - PROTOBUF_FIELD_OFFSET(RemoteClockSync_SyncedClocks, _impl_.client_clocks_)>(
321           reinterpret_cast<char*>(&_impl_.client_clocks_),
322           reinterpret_cast<char*>(&other->_impl_.client_clocks_));
323 }
324 
GetTypeName() const325 std::string RemoteClockSync_SyncedClocks::GetTypeName() const {
326   return "perfetto.protos.RemoteClockSync.SyncedClocks";
327 }
328 
329 
330 // ===================================================================
331 
332 class RemoteClockSync::_Internal {
333  public:
334 };
335 
RemoteClockSync(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)336 RemoteClockSync::RemoteClockSync(::PROTOBUF_NAMESPACE_ID::Arena* arena,
337                          bool is_message_owned)
338   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
339   SharedCtor(arena, is_message_owned);
340   // @@protoc_insertion_point(arena_constructor:perfetto.protos.RemoteClockSync)
341 }
RemoteClockSync(const RemoteClockSync & from)342 RemoteClockSync::RemoteClockSync(const RemoteClockSync& from)
343   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
344   RemoteClockSync* const _this = this; (void)_this;
345   new (&_impl_) Impl_{
346       decltype(_impl_.synced_clocks_){from._impl_.synced_clocks_}
347     , /*decltype(_impl_._cached_size_)*/{}};
348 
349   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
350   // @@protoc_insertion_point(copy_constructor:perfetto.protos.RemoteClockSync)
351 }
352 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)353 inline void RemoteClockSync::SharedCtor(
354     ::_pb::Arena* arena, bool is_message_owned) {
355   (void)arena;
356   (void)is_message_owned;
357   new (&_impl_) Impl_{
358       decltype(_impl_.synced_clocks_){arena}
359     , /*decltype(_impl_._cached_size_)*/{}
360   };
361 }
362 
~RemoteClockSync()363 RemoteClockSync::~RemoteClockSync() {
364   // @@protoc_insertion_point(destructor:perfetto.protos.RemoteClockSync)
365   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
366   (void)arena;
367     return;
368   }
369   SharedDtor();
370 }
371 
SharedDtor()372 inline void RemoteClockSync::SharedDtor() {
373   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
374   _impl_.synced_clocks_.~RepeatedPtrField();
375 }
376 
SetCachedSize(int size) const377 void RemoteClockSync::SetCachedSize(int size) const {
378   _impl_._cached_size_.Set(size);
379 }
380 
Clear()381 void RemoteClockSync::Clear() {
382 // @@protoc_insertion_point(message_clear_start:perfetto.protos.RemoteClockSync)
383   ::uint32_t cached_has_bits = 0;
384   // Prevent compiler warnings about cached_has_bits being unused
385   (void) cached_has_bits;
386 
387   _impl_.synced_clocks_.Clear();
388   _internal_metadata_.Clear<std::string>();
389 }
390 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)391 const char* RemoteClockSync::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
392 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
393   while (!ctx->Done(&ptr)) {
394     ::uint32_t tag;
395     ptr = ::_pbi::ReadTag(ptr, &tag);
396     switch (tag >> 3) {
397       // repeated .perfetto.protos.RemoteClockSync.SyncedClocks synced_clocks = 1;
398       case 1:
399         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
400           ptr -= 1;
401           do {
402             ptr += 1;
403             ptr = ctx->ParseMessage(_internal_add_synced_clocks(), ptr);
404             CHK_(ptr);
405             if (!ctx->DataAvailable(ptr)) break;
406           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
407         } else {
408           goto handle_unusual;
409         }
410         continue;
411       default:
412         goto handle_unusual;
413     }  // switch
414   handle_unusual:
415     if ((tag == 0) || ((tag & 7) == 4)) {
416       CHK_(ptr);
417       ctx->SetLastTag(tag);
418       goto message_done;
419     }
420     ptr = UnknownFieldParse(
421         tag,
422         _internal_metadata_.mutable_unknown_fields<std::string>(),
423         ptr, ctx);
424     CHK_(ptr != nullptr);
425   }  // while
426 message_done:
427   return ptr;
428 failure:
429   ptr = nullptr;
430   goto message_done;
431 #undef CHK_
432 }
433 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const434 ::uint8_t* RemoteClockSync::_InternalSerialize(
435     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
436   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.RemoteClockSync)
437   ::uint32_t cached_has_bits = 0;
438   (void) cached_has_bits;
439 
440   // repeated .perfetto.protos.RemoteClockSync.SyncedClocks synced_clocks = 1;
441   for (unsigned i = 0,
442       n = static_cast<unsigned>(this->_internal_synced_clocks_size()); i < n; i++) {
443     const auto& repfield = this->_internal_synced_clocks(i);
444     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
445         InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
446   }
447 
448   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
449     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
450         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
451   }
452   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.RemoteClockSync)
453   return target;
454 }
455 
ByteSizeLong() const456 size_t RemoteClockSync::ByteSizeLong() const {
457 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.RemoteClockSync)
458   size_t total_size = 0;
459 
460   ::uint32_t cached_has_bits = 0;
461   // Prevent compiler warnings about cached_has_bits being unused
462   (void) cached_has_bits;
463 
464   // repeated .perfetto.protos.RemoteClockSync.SyncedClocks synced_clocks = 1;
465   total_size += 1UL * this->_internal_synced_clocks_size();
466   for (const auto& msg : this->_impl_.synced_clocks_) {
467     total_size +=
468       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
469   }
470 
471   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
472     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
473   }
474   int cached_size = ::_pbi::ToCachedSize(total_size);
475   SetCachedSize(cached_size);
476   return total_size;
477 }
478 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)479 void RemoteClockSync::CheckTypeAndMergeFrom(
480     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
481   MergeFrom(*::_pbi::DownCast<const RemoteClockSync*>(
482       &from));
483 }
484 
MergeFrom(const RemoteClockSync & from)485 void RemoteClockSync::MergeFrom(const RemoteClockSync& from) {
486   RemoteClockSync* const _this = this;
487   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.RemoteClockSync)
488   GOOGLE_DCHECK_NE(&from, _this);
489   ::uint32_t cached_has_bits = 0;
490   (void) cached_has_bits;
491 
492   _this->_impl_.synced_clocks_.MergeFrom(from._impl_.synced_clocks_);
493   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
494 }
495 
CopyFrom(const RemoteClockSync & from)496 void RemoteClockSync::CopyFrom(const RemoteClockSync& from) {
497 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.RemoteClockSync)
498   if (&from == this) return;
499   Clear();
500   MergeFrom(from);
501 }
502 
IsInitialized() const503 bool RemoteClockSync::IsInitialized() const {
504   return true;
505 }
506 
InternalSwap(RemoteClockSync * other)507 void RemoteClockSync::InternalSwap(RemoteClockSync* other) {
508   using std::swap;
509   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
510   _impl_.synced_clocks_.InternalSwap(&other->_impl_.synced_clocks_);
511 }
512 
GetTypeName() const513 std::string RemoteClockSync::GetTypeName() const {
514   return "perfetto.protos.RemoteClockSync";
515 }
516 
517 
518 // @@protoc_insertion_point(namespace_scope)
519 }  // namespace protos
520 }  // namespace perfetto
521 PROTOBUF_NAMESPACE_OPEN
522 template<> PROTOBUF_NOINLINE ::perfetto::protos::RemoteClockSync_SyncedClocks*
CreateMaybeMessage(Arena * arena)523 Arena::CreateMaybeMessage< ::perfetto::protos::RemoteClockSync_SyncedClocks >(Arena* arena) {
524   return Arena::CreateMessageInternal< ::perfetto::protos::RemoteClockSync_SyncedClocks >(arena);
525 }
526 template<> PROTOBUF_NOINLINE ::perfetto::protos::RemoteClockSync*
CreateMaybeMessage(Arena * arena)527 Arena::CreateMaybeMessage< ::perfetto::protos::RemoteClockSync >(Arena* arena) {
528   return Arena::CreateMessageInternal< ::perfetto::protos::RemoteClockSync >(arena);
529 }
530 PROTOBUF_NAMESPACE_CLOSE
531 
532 // @@protoc_insertion_point(global_scope)
533 #include <google/protobuf/port_undef.inc>
534