Explicitly convert an enum to an int (#19537)
[google-protobuf.git] / objectivec / GPBEmpty.pbobjc.m
blobe829ec681df5fde6b3ef8bc5df9420012676e7df
1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // NO CHECKED-IN PROTOBUF GENCODE
3 // clang-format off
4 // source: google/protobuf/empty.proto
6 #import "GPBProtocolBuffers_RuntimeSupport.h"
7 #import "GPBEmpty.pbobjc.h"
9 #if GOOGLE_PROTOBUF_OBJC_VERSION < 30007
10 #error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources.
11 #endif
12 #if 30007 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION
13 #error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources.
14 #endif
16 // @@protoc_insertion_point(imports)
18 #pragma clang diagnostic push
19 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
20 #pragma clang diagnostic ignored "-Wdollar-in-identifier-extension"
22 #pragma mark - Objective-C Class declarations
23 // Forward declarations of Objective-C classes that we can use as
24 // static values in struct initializers.
25 // We don't use [Foo class] because it is not a static value.
26 GPBObjCClassDeclaration(GPBEmpty);
28 #pragma mark - GPBEmptyRoot
30 @implementation GPBEmptyRoot
32 // No extensions in the file and no imports or none of the imports (direct or
33 // indirect) defined extensions, so no need to generate +extensionRegistry.
35 @end
37 static GPBFileDescription GPBEmptyRoot_FileDescription = {
38   .package = "google.protobuf",
39   .prefix = "GPB",
40   .syntax = GPBFileSyntaxProto3
43 #pragma mark - GPBEmpty
45 @implementation GPBEmpty
48 typedef struct GPBEmpty__storage_ {
49   uint32_t _has_storage_[1];
50 } GPBEmpty__storage_;
52 // This method is threadsafe because it is initially called
53 // in +initialize for each subclass.
54 + (GPBDescriptor *)descriptor {
55   static GPBDescriptor *descriptor = nil;
56   if (!descriptor) {
57     GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
58     GPBDescriptor *localDescriptor =
59         [GPBDescriptor allocDescriptorForClass:GPBObjCClass(GPBEmpty)
60                                    messageName:@"Empty"
61                                fileDescription:&GPBEmptyRoot_FileDescription
62                                         fields:NULL
63                                     fieldCount:0
64                                    storageSize:sizeof(GPBEmpty__storage_)
65                                          flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown | GPBDescriptorInitializationFlag_ClosedEnumSupportKnown)];
66     #if defined(DEBUG) && DEBUG
67       NSAssert(descriptor == nil, @"Startup recursed!");
68     #endif  // DEBUG
69     descriptor = localDescriptor;
70   }
71   return descriptor;
74 @end
77 #pragma clang diagnostic pop
79 // @@protoc_insertion_point(global_scope)
81 // clang-format on