Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Side by Side Diff: third_party/protobuf/src/google/protobuf/duration.pb.cc

Issue 1983203003: Update third_party/protobuf to protobuf-v3.0.0-beta-3 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compile error Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Generated by the protocol buffer compiler. DO NOT EDIT! 1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: google/protobuf/duration.proto 2 // source: google/protobuf/duration.proto
3 3
4 #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION 4 #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
5 #include <google/protobuf/duration.pb.h> 5 #include <google/protobuf/duration.pb.h>
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include <google/protobuf/stubs/common.h> 9 #include <google/protobuf/stubs/common.h>
10 #include <google/protobuf/stubs/port.h> 10 #include <google/protobuf/stubs/port.h>
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 void protobuf_AddDesc_google_2fprotobuf_2fduration_2eproto() { 77 void protobuf_AddDesc_google_2fprotobuf_2fduration_2eproto() {
78 static bool already_here = false; 78 static bool already_here = false;
79 if (already_here) return; 79 if (already_here) return;
80 already_here = true; 80 already_here = true;
81 GOOGLE_PROTOBUF_VERIFY_VERSION; 81 GOOGLE_PROTOBUF_VERIFY_VERSION;
82 82
83 ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( 83 ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
84 "\n\036google/protobuf/duration.proto\022\017google" 84 "\n\036google/protobuf/duration.proto\022\017google"
85 ".protobuf\"*\n\010Duration\022\017\n\007seconds\030\001 \001(\003\022\r" 85 ".protobuf\"*\n\010Duration\022\017\n\007seconds\030\001 \001(\003\022\r"
86 "\n\005nanos\030\002 \001(\005BP\n\023com.google.protobufB\rDu" 86 "\n\005nanos\030\002 \001(\005B|\n\023com.google.protobufB\rDu"
87 "rationProtoP\001\240\001\001\242\002\003GPB\252\002\036Google.Protobuf" 87 "rationProtoP\001Z*github.com/golang/protobu"
88 ".WellKnownTypesb\006proto3", 183); 88 "f/ptypes/duration\240\001\001\242\002\003GPB\252\002\036Google.Prot"
89 "obuf.WellKnownTypesb\006proto3", 227);
89 ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( 90 ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
90 "google/protobuf/duration.proto", &protobuf_RegisterTypes); 91 "google/protobuf/duration.proto", &protobuf_RegisterTypes);
91 Duration::default_instance_ = new Duration(); 92 Duration::default_instance_ = new Duration();
92 Duration::default_instance_->InitAsDefaultInstance(); 93 Duration::default_instance_->InitAsDefaultInstance();
93 ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_google_2fproto buf_2fduration_2eproto); 94 ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_google_2fproto buf_2fduration_2eproto);
94 } 95 }
95 96
96 // Force AddDescriptors() to be called at static initialization time. 97 // Force AddDescriptors() to be called at static initialization time.
97 struct StaticDescriptorInitializer_google_2fprotobuf_2fduration_2eproto { 98 struct StaticDescriptorInitializer_google_2fprotobuf_2fduration_2eproto {
98 StaticDescriptorInitializer_google_2fprotobuf_2fduration_2eproto() { 99 StaticDescriptorInitializer_google_2fprotobuf_2fduration_2eproto() {
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 172
172 Duration* Duration::New(::google::protobuf::Arena* arena) const { 173 Duration* Duration::New(::google::protobuf::Arena* arena) const {
173 Duration* n = new Duration; 174 Duration* n = new Duration;
174 if (arena != NULL) { 175 if (arena != NULL) {
175 arena->Own(n); 176 arena->Own(n);
176 } 177 }
177 return n; 178 return n;
178 } 179 }
179 180
180 void Duration::Clear() { 181 void Duration::Clear() {
182 // @@protoc_insertion_point(message_clear_start:google.protobuf.Duration)
183 #if defined(__clang__)
184 #define ZR_HELPER_(f) \
185 _Pragma("clang diagnostic push") \
186 _Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
187 __builtin_offsetof(Duration, f) \
188 _Pragma("clang diagnostic pop")
189 #else
181 #define ZR_HELPER_(f) reinterpret_cast<char*>(\ 190 #define ZR_HELPER_(f) reinterpret_cast<char*>(\
182 &reinterpret_cast<Duration*>(16)->f) 191 &reinterpret_cast<Duration*>(16)->f)
192 #endif
183 193
184 #define ZR_(first, last) do {\ 194 #define ZR_(first, last) do {\
185 ::memset(&first, 0,\ 195 ::memset(&first, 0,\
186 ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\ 196 ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
187 } while (0) 197 } while (0)
188 198
189 ZR_(seconds_, nanos_); 199 ZR_(seconds_, nanos_);
190 200
191 #undef ZR_HELPER_ 201 #undef ZR_HELPER_
192 #undef ZR_ 202 #undef ZR_
193 203
194 } 204 }
195 205
196 bool Duration::MergePartialFromCodedStream( 206 bool Duration::MergePartialFromCodedStream(
197 ::google::protobuf::io::CodedInputStream* input) { 207 ::google::protobuf::io::CodedInputStream* input) {
198 #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure 208 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
199 ::google::protobuf::uint32 tag; 209 ::google::protobuf::uint32 tag;
200 // @@protoc_insertion_point(parse_start:google.protobuf.Duration) 210 // @@protoc_insertion_point(parse_start:google.protobuf.Duration)
201 for (;;) { 211 for (;;) {
202 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff( 127); 212 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff( 127);
203 tag = p.first; 213 tag = p.first;
204 if (!p.second) goto handle_unusual; 214 if (!p.second) goto handle_unusual;
205 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag) ) { 215 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag) ) {
206 // optional int64 seconds = 1; 216 // optional int64 seconds = 1;
207 case 1: { 217 case 1: {
208 if (tag == 8) { 218 if (tag == 8) {
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 // optional int32 nanos = 2; 290 // optional int32 nanos = 2;
281 if (this->nanos() != 0) { 291 if (this->nanos() != 0) {
282 target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->nanos(), target); 292 target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->nanos(), target);
283 } 293 }
284 294
285 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Duration) 295 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Duration)
286 return target; 296 return target;
287 } 297 }
288 298
289 int Duration::ByteSize() const { 299 int Duration::ByteSize() const {
300 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Duration)
290 int total_size = 0; 301 int total_size = 0;
291 302
292 // optional int64 seconds = 1; 303 // optional int64 seconds = 1;
293 if (this->seconds() != 0) { 304 if (this->seconds() != 0) {
294 total_size += 1 + 305 total_size += 1 +
295 ::google::protobuf::internal::WireFormatLite::Int64Size( 306 ::google::protobuf::internal::WireFormatLite::Int64Size(
296 this->seconds()); 307 this->seconds());
297 } 308 }
298 309
299 // optional int32 nanos = 2; 310 // optional int32 nanos = 2;
300 if (this->nanos() != 0) { 311 if (this->nanos() != 0) {
301 total_size += 1 + 312 total_size += 1 +
302 ::google::protobuf::internal::WireFormatLite::Int32Size( 313 ::google::protobuf::internal::WireFormatLite::Int32Size(
303 this->nanos()); 314 this->nanos());
304 } 315 }
305 316
306 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); 317 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
307 _cached_size_ = total_size; 318 _cached_size_ = total_size;
308 GOOGLE_SAFE_CONCURRENT_WRITES_END(); 319 GOOGLE_SAFE_CONCURRENT_WRITES_END();
309 return total_size; 320 return total_size;
310 } 321 }
311 322
312 void Duration::MergeFrom(const ::google::protobuf::Message& from) { 323 void Duration::MergeFrom(const ::google::protobuf::Message& from) {
324 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Duratio n)
313 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); 325 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
314 const Duration* source = 326 const Duration* source =
315 ::google::protobuf::internal::DynamicCastToGenerated<const Duration>( 327 ::google::protobuf::internal::DynamicCastToGenerated<const Duration>(
316 &from); 328 &from);
317 if (source == NULL) { 329 if (source == NULL) {
330 // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.D uration)
318 ::google::protobuf::internal::ReflectionOps::Merge(from, this); 331 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
319 } else { 332 } else {
333 // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobu f.Duration)
320 MergeFrom(*source); 334 MergeFrom(*source);
321 } 335 }
322 } 336 }
323 337
324 void Duration::MergeFrom(const Duration& from) { 338 void Duration::MergeFrom(const Duration& from) {
339 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Dura tion)
325 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); 340 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
326 if (from.seconds() != 0) { 341 if (from.seconds() != 0) {
327 set_seconds(from.seconds()); 342 set_seconds(from.seconds());
328 } 343 }
329 if (from.nanos() != 0) { 344 if (from.nanos() != 0) {
330 set_nanos(from.nanos()); 345 set_nanos(from.nanos());
331 } 346 }
332 } 347 }
333 348
334 void Duration::CopyFrom(const ::google::protobuf::Message& from) { 349 void Duration::CopyFrom(const ::google::protobuf::Message& from) {
350 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Duration )
335 if (&from == this) return; 351 if (&from == this) return;
336 Clear(); 352 Clear();
337 MergeFrom(from); 353 MergeFrom(from);
338 } 354 }
339 355
340 void Duration::CopyFrom(const Duration& from) { 356 void Duration::CopyFrom(const Duration& from) {
357 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Durat ion)
341 if (&from == this) return; 358 if (&from == this) return;
342 Clear(); 359 Clear();
343 MergeFrom(from); 360 MergeFrom(from);
344 } 361 }
345 362
346 bool Duration::IsInitialized() const { 363 bool Duration::IsInitialized() const {
347 364
348 return true; 365 return true;
349 } 366 }
350 367
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 } 416 }
400 417
401 #endif // PROTOBUF_INLINE_NOT_IN_HEADERS 418 #endif // PROTOBUF_INLINE_NOT_IN_HEADERS
402 419
403 // @@protoc_insertion_point(namespace_scope) 420 // @@protoc_insertion_point(namespace_scope)
404 421
405 } // namespace protobuf 422 } // namespace protobuf
406 } // namespace google 423 } // namespace google
407 424
408 // @@protoc_insertion_point(global_scope) 425 // @@protoc_insertion_point(global_scope)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698