diff --git a/ProtocolBuffers-Swift.podspec b/ProtocolBuffers-Swift.podspec index 45c7cbf..32947b7 100644 --- a/ProtocolBuffers-Swift.podspec +++ b/ProtocolBuffers-Swift.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "ProtocolBuffers-Swift" - s.version = "3.0.22" + s.version = "3.0.23" s.summary = "Protocol Buffers for Swift" s.homepage = "http://protobuf.io#swift" s.license = "Apache 2.0" diff --git a/Source/Google.Protobuf.Any.proto.swift b/Source/Google.Protobuf.Any.proto.swift index 743fb6e..7990000 100644 --- a/Source/Google.Protobuf.Any.proto.swift +++ b/Source/Google.Protobuf.Any.proto.swift @@ -1,4 +1,4 @@ -/// Generated by the Protocol Buffers 3.3.2 compiler. DO NOT EDIT! +/// Generated by the Protocol Buffers 3.4.0 compiler. DO NOT EDIT! /// Protobuf-swift version: 3.0.22 /// Source file "any.proto" /// Syntax "Proto3" diff --git a/Source/Google.Protobuf.Api.proto.swift b/Source/Google.Protobuf.Api.proto.swift index 0c576a8..7ca63b6 100644 --- a/Source/Google.Protobuf.Api.proto.swift +++ b/Source/Google.Protobuf.Api.proto.swift @@ -1,4 +1,4 @@ -/// Generated by the Protocol Buffers 3.3.2 compiler. DO NOT EDIT! +/// Generated by the Protocol Buffers 3.4.0 compiler. DO NOT EDIT! /// Protobuf-swift version: 3.0.22 /// Source file "api.proto" /// Syntax "Proto3" diff --git a/Source/Google.Protobuf.Compiler.Plugin.proto.swift b/Source/Google.Protobuf.Compiler.Plugin.proto.swift index e18ac5b..7aac045 100644 --- a/Source/Google.Protobuf.Compiler.Plugin.proto.swift +++ b/Source/Google.Protobuf.Compiler.Plugin.proto.swift @@ -1,4 +1,4 @@ -/// Generated by the Protocol Buffers 3.3.2 compiler. DO NOT EDIT! +/// Generated by the Protocol Buffers 3.4.0 compiler. DO NOT EDIT! /// Protobuf-swift version: 3.0.22 /// Source file "plugin.proto" /// Syntax "Proto2" diff --git a/Source/Google.Protobuf.Descriptor.proto.swift b/Source/Google.Protobuf.Descriptor.proto.swift index 3b98d89..b3d82a0 100644 --- a/Source/Google.Protobuf.Descriptor.proto.swift +++ b/Source/Google.Protobuf.Descriptor.proto.swift @@ -1,4 +1,4 @@ -/// Generated by the Protocol Buffers 3.3.2 compiler. DO NOT EDIT! +/// Generated by the Protocol Buffers 3.4.0 compiler. DO NOT EDIT! /// Protobuf-swift version: 3.0.22 /// Source file "descriptor.proto" /// Syntax "Proto2" diff --git a/Source/Google.Protobuf.Duration.proto.swift b/Source/Google.Protobuf.Duration.proto.swift index 9f94e5f..41fc432 100644 --- a/Source/Google.Protobuf.Duration.proto.swift +++ b/Source/Google.Protobuf.Duration.proto.swift @@ -1,4 +1,4 @@ -/// Generated by the Protocol Buffers 3.3.2 compiler. DO NOT EDIT! +/// Generated by the Protocol Buffers 3.4.0 compiler. DO NOT EDIT! /// Protobuf-swift version: 3.0.22 /// Source file "duration.proto" /// Syntax "Proto3" diff --git a/Source/Google.Protobuf.Empty.proto.swift b/Source/Google.Protobuf.Empty.proto.swift index 4dd07bd..c52ef47 100644 --- a/Source/Google.Protobuf.Empty.proto.swift +++ b/Source/Google.Protobuf.Empty.proto.swift @@ -1,4 +1,4 @@ -/// Generated by the Protocol Buffers 3.3.2 compiler. DO NOT EDIT! +/// Generated by the Protocol Buffers 3.4.0 compiler. DO NOT EDIT! /// Protobuf-swift version: 3.0.22 /// Source file "empty.proto" /// Syntax "Proto3" diff --git a/Source/Google.Protobuf.FieldMask.proto.swift b/Source/Google.Protobuf.FieldMask.proto.swift index 6390be8..7d39e89 100644 --- a/Source/Google.Protobuf.FieldMask.proto.swift +++ b/Source/Google.Protobuf.FieldMask.proto.swift @@ -1,4 +1,4 @@ -/// Generated by the Protocol Buffers 3.3.2 compiler. DO NOT EDIT! +/// Generated by the Protocol Buffers 3.4.0 compiler. DO NOT EDIT! /// Protobuf-swift version: 3.0.22 /// Source file "field_mask.proto" /// Syntax "Proto3" diff --git a/Source/Google.Protobuf.SourceContext.proto.swift b/Source/Google.Protobuf.SourceContext.proto.swift index 2c268a7..ce128af 100644 --- a/Source/Google.Protobuf.SourceContext.proto.swift +++ b/Source/Google.Protobuf.SourceContext.proto.swift @@ -1,4 +1,4 @@ -/// Generated by the Protocol Buffers 3.3.2 compiler. DO NOT EDIT! +/// Generated by the Protocol Buffers 3.4.0 compiler. DO NOT EDIT! /// Protobuf-swift version: 3.0.22 /// Source file "source_context.proto" /// Syntax "Proto3" diff --git a/Source/Google.Protobuf.Struct.proto.swift b/Source/Google.Protobuf.Struct.proto.swift index 4aba38a..5006c80 100644 --- a/Source/Google.Protobuf.Struct.proto.swift +++ b/Source/Google.Protobuf.Struct.proto.swift @@ -1,4 +1,4 @@ -/// Generated by the Protocol Buffers 3.3.2 compiler. DO NOT EDIT! +/// Generated by the Protocol Buffers 3.4.0 compiler. DO NOT EDIT! /// Protobuf-swift version: 3.0.22 /// Source file "struct.proto" /// Syntax "Proto3" diff --git a/Source/Google.Protobuf.SwiftDescriptor.proto.swift b/Source/Google.Protobuf.SwiftDescriptor.proto.swift index 829897a..fec67b8 100644 --- a/Source/Google.Protobuf.SwiftDescriptor.proto.swift +++ b/Source/Google.Protobuf.SwiftDescriptor.proto.swift @@ -1,4 +1,4 @@ -/// Generated by the Protocol Buffers 3.3.2 compiler. DO NOT EDIT! +/// Generated by the Protocol Buffers 3.4.0 compiler. DO NOT EDIT! /// Protobuf-swift version: 3.0.22 /// Source file "swift-descriptor.proto" /// Syntax "Proto2" diff --git a/Source/Google.Protobuf.Timestamp.proto.swift b/Source/Google.Protobuf.Timestamp.proto.swift index 37ec9a9..93b2fdb 100644 --- a/Source/Google.Protobuf.Timestamp.proto.swift +++ b/Source/Google.Protobuf.Timestamp.proto.swift @@ -1,4 +1,4 @@ -/// Generated by the Protocol Buffers 3.3.2 compiler. DO NOT EDIT! +/// Generated by the Protocol Buffers 3.4.0 compiler. DO NOT EDIT! /// Protobuf-swift version: 3.0.22 /// Source file "timestamp.proto" /// Syntax "Proto3" diff --git a/Source/Google.Protobuf.Type.proto.swift b/Source/Google.Protobuf.Type.proto.swift index 7a6f661..12deb7e 100644 --- a/Source/Google.Protobuf.Type.proto.swift +++ b/Source/Google.Protobuf.Type.proto.swift @@ -1,4 +1,4 @@ -/// Generated by the Protocol Buffers 3.3.2 compiler. DO NOT EDIT! +/// Generated by the Protocol Buffers 3.4.0 compiler. DO NOT EDIT! /// Protobuf-swift version: 3.0.22 /// Source file "type.proto" /// Syntax "Proto3" diff --git a/Source/Google.Protobuf.Wrappers.proto.swift b/Source/Google.Protobuf.Wrappers.proto.swift index a40e91d..effca8d 100644 --- a/Source/Google.Protobuf.Wrappers.proto.swift +++ b/Source/Google.Protobuf.Wrappers.proto.swift @@ -1,4 +1,4 @@ -/// Generated by the Protocol Buffers 3.3.2 compiler. DO NOT EDIT! +/// Generated by the Protocol Buffers 3.4.0 compiler. DO NOT EDIT! /// Protobuf-swift version: 3.0.22 /// Source file "wrappers.proto" /// Syntax "Proto3" diff --git a/plugin/ProtocolBuffers/ProtocolBuffersTests/Performance.proto.swift b/plugin/ProtocolBuffers/ProtocolBuffersTests/Performance.proto.swift index 15ffc05..d11ea7e 100644 --- a/plugin/ProtocolBuffers/ProtocolBuffersTests/Performance.proto.swift +++ b/plugin/ProtocolBuffers/ProtocolBuffersTests/Performance.proto.swift @@ -1,4 +1,4 @@ -/// Generated by the Protocol Buffers 3.3.2 compiler. DO NOT EDIT! +/// Generated by the Protocol Buffers 3.4.0 compiler. DO NOT EDIT! /// Protobuf-swift version: 3.0.22 /// Source file "performance.proto" /// Syntax "Proto2" diff --git a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/Bar.Foo.proto.swift b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/Bar.Foo.proto.swift index a1e6281..a395307 100644 --- a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/Bar.Foo.proto.swift +++ b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/Bar.Foo.proto.swift @@ -1,4 +1,4 @@ -/// Generated by the Protocol Buffers 3.3.2 compiler. DO NOT EDIT! +/// Generated by the Protocol Buffers 3.4.0 compiler. DO NOT EDIT! /// Protobuf-swift version: 3.0.22 /// Source file "foo.proto" /// Syntax "Proto2" diff --git a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/Baz.Foo.proto.swift b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/Baz.Foo.proto.swift index a40d62f..7260b43 100644 --- a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/Baz.Foo.proto.swift +++ b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/Baz.Foo.proto.swift @@ -1,4 +1,4 @@ -/// Generated by the Protocol Buffers 3.3.2 compiler. DO NOT EDIT! +/// Generated by the Protocol Buffers 3.4.0 compiler. DO NOT EDIT! /// Protobuf-swift version: 3.0.22 /// Source file "foo.proto" /// Syntax "Proto2" diff --git a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/Google.Protobuf.NoGenericServicesTest.UnittestNoGenericServices.proto.swift b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/Google.Protobuf.NoGenericServicesTest.UnittestNoGenericServices.proto.swift index 39dcf1a..3853a6d 100644 --- a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/Google.Protobuf.NoGenericServicesTest.UnittestNoGenericServices.proto.swift +++ b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/Google.Protobuf.NoGenericServicesTest.UnittestNoGenericServices.proto.swift @@ -1,4 +1,4 @@ -/// Generated by the Protocol Buffers 3.3.2 compiler. DO NOT EDIT! +/// Generated by the Protocol Buffers 3.4.0 compiler. DO NOT EDIT! /// Protobuf-swift version: 3.0.22 /// Source file "unittest_no_generic_services.proto" /// Syntax "Proto2" diff --git a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/Google.Protobuf.UnittestEnormousDescriptor.proto.swift b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/Google.Protobuf.UnittestEnormousDescriptor.proto.swift index a4338b3..1fa475f 100644 --- a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/Google.Protobuf.UnittestEnormousDescriptor.proto.swift +++ b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/Google.Protobuf.UnittestEnormousDescriptor.proto.swift @@ -1,4 +1,4 @@ -/// Generated by the Protocol Buffers 3.3.2 compiler. DO NOT EDIT! +/// Generated by the Protocol Buffers 3.4.0 compiler. DO NOT EDIT! /// Protobuf-swift version: 3.0.22 /// Source file "unittest_enormous_descriptor.proto" /// Syntax "Proto2" diff --git a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/Proto2ArenaUnittest.UnittestArena.proto.swift b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/Proto2ArenaUnittest.UnittestArena.proto.swift index 05fb8ff..a96fc85 100644 --- a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/Proto2ArenaUnittest.UnittestArena.proto.swift +++ b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/Proto2ArenaUnittest.UnittestArena.proto.swift @@ -1,4 +1,4 @@ -/// Generated by the Protocol Buffers 3.3.2 compiler. DO NOT EDIT! +/// Generated by the Protocol Buffers 3.4.0 compiler. DO NOT EDIT! /// Protobuf-swift version: 3.0.22 /// Source file "unittest_arena.proto" /// Syntax "Proto2" diff --git a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/Proto2ArenaUnittest.UnittestNoArenaImport.proto.swift b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/Proto2ArenaUnittest.UnittestNoArenaImport.proto.swift index 0739c2d..e21e62a 100644 --- a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/Proto2ArenaUnittest.UnittestNoArenaImport.proto.swift +++ b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/Proto2ArenaUnittest.UnittestNoArenaImport.proto.swift @@ -1,4 +1,4 @@ -/// Generated by the Protocol Buffers 3.3.2 compiler. DO NOT EDIT! +/// Generated by the Protocol Buffers 3.4.0 compiler. DO NOT EDIT! /// Protobuf-swift version: 3.0.22 /// Source file "unittest_no_arena_import.proto" /// Syntax "Proto2" diff --git a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/Proto2NofieldpresenceUnittest.UnittestNoFieldPresence.proto.swift b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/Proto2NofieldpresenceUnittest.UnittestNoFieldPresence.proto.swift index 7efc815..cfc5348 100644 --- a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/Proto2NofieldpresenceUnittest.UnittestNoFieldPresence.proto.swift +++ b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/Proto2NofieldpresenceUnittest.UnittestNoFieldPresence.proto.swift @@ -1,4 +1,4 @@ -/// Generated by the Protocol Buffers 3.3.2 compiler. DO NOT EDIT! +/// Generated by the Protocol Buffers 3.4.0 compiler. DO NOT EDIT! /// Protobuf-swift version: 3.0.22 /// Source file "unittest_no_field_presence.proto" /// Syntax "Proto3" diff --git a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/Proto3ArenaUnittest.UnittestProto3Arena.proto.swift b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/Proto3ArenaUnittest.UnittestProto3Arena.proto.swift index bc17e65..ec45bf6 100644 --- a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/Proto3ArenaUnittest.UnittestProto3Arena.proto.swift +++ b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/Proto3ArenaUnittest.UnittestProto3Arena.proto.swift @@ -1,4 +1,4 @@ -/// Generated by the Protocol Buffers 3.3.2 compiler. DO NOT EDIT! +/// Generated by the Protocol Buffers 3.4.0 compiler. DO NOT EDIT! /// Protobuf-swift version: 3.0.22 /// Source file "unittest_proto3_arena.proto" /// Syntax "Proto3" diff --git a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/Proto3PreserveUnknownEnumUnittest.UnittestPreserveUnknownEnum.proto.swift b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/Proto3PreserveUnknownEnumUnittest.UnittestPreserveUnknownEnum.proto.swift index 73f41ce..05104ad 100644 --- a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/Proto3PreserveUnknownEnumUnittest.UnittestPreserveUnknownEnum.proto.swift +++ b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/Proto3PreserveUnknownEnumUnittest.UnittestPreserveUnknownEnum.proto.swift @@ -1,4 +1,4 @@ -/// Generated by the Protocol Buffers 3.3.2 compiler. DO NOT EDIT! +/// Generated by the Protocol Buffers 3.4.0 compiler. DO NOT EDIT! /// Protobuf-swift version: 3.0.22 /// Source file "unittest_preserve_unknown_enum.proto" /// Syntax "Proto3" diff --git a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittest.Unittest.proto.swift b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittest.Unittest.proto.swift index 897c0e9..0b26766 100644 --- a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittest.Unittest.proto.swift +++ b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittest.Unittest.proto.swift @@ -1,4 +1,4 @@ -/// Generated by the Protocol Buffers 3.3.2 compiler. DO NOT EDIT! +/// Generated by the Protocol Buffers 3.4.0 compiler. DO NOT EDIT! /// Protobuf-swift version: 3.0.22 /// Source file "unittest.proto" /// Syntax "Proto2" diff --git a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittest.UnittestCustomOptions.proto.swift b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittest.UnittestCustomOptions.proto.swift index 83fd68d..8c5d181 100644 --- a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittest.UnittestCustomOptions.proto.swift +++ b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittest.UnittestCustomOptions.proto.swift @@ -1,4 +1,4 @@ -/// Generated by the Protocol Buffers 3.3.2 compiler. DO NOT EDIT! +/// Generated by the Protocol Buffers 3.4.0 compiler. DO NOT EDIT! /// Protobuf-swift version: 3.0.22 /// Source file "unittest_custom_options.proto" /// Syntax "Proto2" diff --git a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittest.UnittestEmbedOptimizeFor.proto.swift b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittest.UnittestEmbedOptimizeFor.proto.swift index d5c8b21..8979a6b 100644 --- a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittest.UnittestEmbedOptimizeFor.proto.swift +++ b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittest.UnittestEmbedOptimizeFor.proto.swift @@ -1,4 +1,4 @@ -/// Generated by the Protocol Buffers 3.3.2 compiler. DO NOT EDIT! +/// Generated by the Protocol Buffers 3.4.0 compiler. DO NOT EDIT! /// Protobuf-swift version: 3.0.22 /// Source file "unittest_embed_optimize_for.proto" /// Syntax "Proto2" diff --git a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittest.UnittestLite.proto.swift b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittest.UnittestLite.proto.swift index 3bb6059..44b02b2 100644 --- a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittest.UnittestLite.proto.swift +++ b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittest.UnittestLite.proto.swift @@ -1,4 +1,4 @@ -/// Generated by the Protocol Buffers 3.3.2 compiler. DO NOT EDIT! +/// Generated by the Protocol Buffers 3.4.0 compiler. DO NOT EDIT! /// Protobuf-swift version: 3.0.22 /// Source file "unittest_lite.proto" /// Syntax "Proto2" diff --git a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittest.UnittestLiteImportsNonlite.proto.swift b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittest.UnittestLiteImportsNonlite.proto.swift index 72f32ec..4181e5e 100644 --- a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittest.UnittestLiteImportsNonlite.proto.swift +++ b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittest.UnittestLiteImportsNonlite.proto.swift @@ -1,4 +1,4 @@ -/// Generated by the Protocol Buffers 3.3.2 compiler. DO NOT EDIT! +/// Generated by the Protocol Buffers 3.4.0 compiler. DO NOT EDIT! /// Protobuf-swift version: 3.0.22 /// Source file "unittest_lite_imports_nonlite.proto" /// Syntax "Proto2" diff --git a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittest.UnittestMset.proto.swift b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittest.UnittestMset.proto.swift index cfbca56..47447b5 100644 --- a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittest.UnittestMset.proto.swift +++ b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittest.UnittestMset.proto.swift @@ -1,4 +1,4 @@ -/// Generated by the Protocol Buffers 3.3.2 compiler. DO NOT EDIT! +/// Generated by the Protocol Buffers 3.4.0 compiler. DO NOT EDIT! /// Protobuf-swift version: 3.0.22 /// Source file "unittest_mset.proto" /// Syntax "Proto2" diff --git a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittest.UnittestOptimizeFor.proto.swift b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittest.UnittestOptimizeFor.proto.swift index 142ad7c..9de1c57 100644 --- a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittest.UnittestOptimizeFor.proto.swift +++ b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittest.UnittestOptimizeFor.proto.swift @@ -1,4 +1,4 @@ -/// Generated by the Protocol Buffers 3.3.2 compiler. DO NOT EDIT! +/// Generated by the Protocol Buffers 3.4.0 compiler. DO NOT EDIT! /// Protobuf-swift version: 3.0.22 /// Source file "unittest_optimize_for.proto" /// Syntax "Proto2" diff --git a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittest.UnittestWellKnownTypes.proto.swift b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittest.UnittestWellKnownTypes.proto.swift index 99fa588..dfb4ce3 100644 --- a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittest.UnittestWellKnownTypes.proto.swift +++ b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittest.UnittestWellKnownTypes.proto.swift @@ -1,4 +1,4 @@ -/// Generated by the Protocol Buffers 3.3.2 compiler. DO NOT EDIT! +/// Generated by the Protocol Buffers 3.4.0 compiler. DO NOT EDIT! /// Protobuf-swift version: 3.0.22 /// Source file "unittest_well_known_types.proto" /// Syntax "Proto3" diff --git a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittestImport.UnittestImport.proto.swift b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittestImport.UnittestImport.proto.swift index 6c03625..b53515f 100644 --- a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittestImport.UnittestImport.proto.swift +++ b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittestImport.UnittestImport.proto.swift @@ -1,4 +1,4 @@ -/// Generated by the Protocol Buffers 3.3.2 compiler. DO NOT EDIT! +/// Generated by the Protocol Buffers 3.4.0 compiler. DO NOT EDIT! /// Protobuf-swift version: 3.0.22 /// Source file "unittest_import.proto" /// Syntax "Proto2" diff --git a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittestImport.UnittestImportLite.proto.swift b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittestImport.UnittestImportLite.proto.swift index 58a481d..ee226b5 100644 --- a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittestImport.UnittestImportLite.proto.swift +++ b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittestImport.UnittestImportLite.proto.swift @@ -1,4 +1,4 @@ -/// Generated by the Protocol Buffers 3.3.2 compiler. DO NOT EDIT! +/// Generated by the Protocol Buffers 3.4.0 compiler. DO NOT EDIT! /// Protobuf-swift version: 3.0.22 /// Source file "unittest_import_lite.proto" /// Syntax "Proto2" diff --git a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittestImport.UnittestImportPublic.proto.swift b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittestImport.UnittestImportPublic.proto.swift index 4e9905c..b182c47 100644 --- a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittestImport.UnittestImportPublic.proto.swift +++ b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittestImport.UnittestImportPublic.proto.swift @@ -1,4 +1,4 @@ -/// Generated by the Protocol Buffers 3.3.2 compiler. DO NOT EDIT! +/// Generated by the Protocol Buffers 3.4.0 compiler. DO NOT EDIT! /// Protobuf-swift version: 3.0.22 /// Source file "unittest_import_public.proto" /// Syntax "Proto2" diff --git a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittestImport.UnittestImportPublicLite.proto.swift b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittestImport.UnittestImportPublicLite.proto.swift index 303c61b..9dcac36 100644 --- a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittestImport.UnittestImportPublicLite.proto.swift +++ b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittestImport.UnittestImportPublicLite.proto.swift @@ -1,4 +1,4 @@ -/// Generated by the Protocol Buffers 3.3.2 compiler. DO NOT EDIT! +/// Generated by the Protocol Buffers 3.4.0 compiler. DO NOT EDIT! /// Protobuf-swift version: 3.0.22 /// Source file "unittest_import_public_lite.proto" /// Syntax "Proto2" diff --git a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittestNoArena.UnittestNoArena.proto.swift b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittestNoArena.UnittestNoArena.proto.swift index a6f72d6..1affeec 100644 --- a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittestNoArena.UnittestNoArena.proto.swift +++ b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittestNoArena.UnittestNoArena.proto.swift @@ -1,4 +1,4 @@ -/// Generated by the Protocol Buffers 3.3.2 compiler. DO NOT EDIT! +/// Generated by the Protocol Buffers 3.4.0 compiler. DO NOT EDIT! /// Protobuf-swift version: 3.0.22 /// Source file "unittest_no_arena.proto" /// Syntax "Proto2" diff --git a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/SwiftProtobufUnittest.UnittestMaps.proto.swift b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/SwiftProtobufUnittest.UnittestMaps.proto.swift index 74deddc..206be32 100644 --- a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/SwiftProtobufUnittest.UnittestMaps.proto.swift +++ b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/SwiftProtobufUnittest.UnittestMaps.proto.swift @@ -1,4 +1,4 @@ -/// Generated by the Protocol Buffers 3.3.2 compiler. DO NOT EDIT! +/// Generated by the Protocol Buffers 3.4.0 compiler. DO NOT EDIT! /// Protobuf-swift version: 3.0.22 /// Source file "unittest_maps.proto" /// Syntax "Proto2" diff --git a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/UnittestDropUnknownFields.UnittestDropUnknownFields.proto.swift b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/UnittestDropUnknownFields.UnittestDropUnknownFields.proto.swift index 4198e24..7201812 100644 --- a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/UnittestDropUnknownFields.UnittestDropUnknownFields.proto.swift +++ b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/UnittestDropUnknownFields.UnittestDropUnknownFields.proto.swift @@ -1,4 +1,4 @@ -/// Generated by the Protocol Buffers 3.3.2 compiler. DO NOT EDIT! +/// Generated by the Protocol Buffers 3.4.0 compiler. DO NOT EDIT! /// Protobuf-swift version: 3.0.22 /// Source file "unittest_drop_unknown_fields.proto" /// Syntax "Proto3" diff --git a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/UnittestEmpty.proto.swift b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/UnittestEmpty.proto.swift index 5c1b350..b05f82d 100644 --- a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/UnittestEmpty.proto.swift +++ b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/UnittestEmpty.proto.swift @@ -1,4 +1,4 @@ -/// Generated by the Protocol Buffers 3.3.2 compiler. DO NOT EDIT! +/// Generated by the Protocol Buffers 3.4.0 compiler. DO NOT EDIT! /// Protobuf-swift version: 3.0.22 /// Source file "unittest_empty.proto" /// Syntax "Proto2" diff --git a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/UnittestErrorType.proto.swift b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/UnittestErrorType.proto.swift index 5a93492..bfb28ac 100644 --- a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/UnittestErrorType.proto.swift +++ b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/UnittestErrorType.proto.swift @@ -1,4 +1,4 @@ -/// Generated by the Protocol Buffers 3.3.2 compiler. DO NOT EDIT! +/// Generated by the Protocol Buffers 3.4.0 compiler. DO NOT EDIT! /// Protobuf-swift version: 3.0.22 /// Source file "unittest_error_type.proto" /// Syntax "Proto2" diff --git a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/UnittestStruct.proto.swift b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/UnittestStruct.proto.swift index 2f2fe79..5a4618c 100644 --- a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/UnittestStruct.proto.swift +++ b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/UnittestStruct.proto.swift @@ -1,4 +1,4 @@ -/// Generated by the Protocol Buffers 3.3.2 compiler. DO NOT EDIT! +/// Generated by the Protocol Buffers 3.4.0 compiler. DO NOT EDIT! /// Protobuf-swift version: 3.0.22 /// Source file "unittest_struct.proto" /// Syntax "Proto2" diff --git a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/UnittestThreading.proto.swift b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/UnittestThreading.proto.swift index 7905b96..5dd3ac0 100644 --- a/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/UnittestThreading.proto.swift +++ b/plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/UnittestThreading.proto.swift @@ -1,4 +1,4 @@ -/// Generated by the Protocol Buffers 3.3.2 compiler. DO NOT EDIT! +/// Generated by the Protocol Buffers 3.4.0 compiler. DO NOT EDIT! /// Protobuf-swift version: 3.0.22 /// Source file "unittest_threading.proto" /// Syntax "Proto3" diff --git a/plugin/compiler/google/protobuf/descriptor.pb.cc b/plugin/compiler/google/protobuf/descriptor.pb.cc index b389a4e..1f6a7fa 100644 --- a/plugin/compiler/google/protobuf/descriptor.pb.cc +++ b/plugin/compiler/google/protobuf/descriptor.pb.cc @@ -19,55 +19,130 @@ namespace google { namespace protobuf { -class FileDescriptorSetDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class FileDescriptorSetDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _FileDescriptorSet_default_instance_; -class FileDescriptorProtoDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class FileDescriptorProtoDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _FileDescriptorProto_default_instance_; -class DescriptorProto_ExtensionRangeDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class DescriptorProto_ExtensionRangeDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _DescriptorProto_ExtensionRange_default_instance_; -class DescriptorProto_ReservedRangeDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class DescriptorProto_ReservedRangeDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _DescriptorProto_ReservedRange_default_instance_; -class DescriptorProtoDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class DescriptorProtoDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _DescriptorProto_default_instance_; -class FieldDescriptorProtoDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class FieldDescriptorProtoDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _FieldDescriptorProto_default_instance_; -class OneofDescriptorProtoDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class OneofDescriptorProtoDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _OneofDescriptorProto_default_instance_; -class EnumDescriptorProtoDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class EnumDescriptorProtoDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _EnumDescriptorProto_default_instance_; -class EnumValueDescriptorProtoDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class EnumValueDescriptorProtoDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _EnumValueDescriptorProto_default_instance_; -class ServiceDescriptorProtoDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class ServiceDescriptorProtoDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _ServiceDescriptorProto_default_instance_; -class MethodDescriptorProtoDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class MethodDescriptorProtoDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _MethodDescriptorProto_default_instance_; -class FileOptionsDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class FileOptionsDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _FileOptions_default_instance_; -class MessageOptionsDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class MessageOptionsDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _MessageOptions_default_instance_; -class FieldOptionsDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class FieldOptionsDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _FieldOptions_default_instance_; -class OneofOptionsDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class OneofOptionsDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _OneofOptions_default_instance_; -class EnumOptionsDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class EnumOptionsDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _EnumOptions_default_instance_; -class EnumValueOptionsDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class EnumValueOptionsDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _EnumValueOptions_default_instance_; -class ServiceOptionsDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class ServiceOptionsDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _ServiceOptions_default_instance_; -class MethodOptionsDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class MethodOptionsDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _MethodOptions_default_instance_; -class UninterpretedOption_NamePartDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class UninterpretedOption_NamePartDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _UninterpretedOption_NamePart_default_instance_; -class UninterpretedOptionDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class UninterpretedOptionDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _UninterpretedOption_default_instance_; -class SourceCodeInfo_LocationDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class SourceCodeInfo_LocationDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _SourceCodeInfo_Location_default_instance_; -class SourceCodeInfoDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class SourceCodeInfoDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _SourceCodeInfo_default_instance_; -class GeneratedCodeInfo_AnnotationDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class GeneratedCodeInfo_AnnotationDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _GeneratedCodeInfo_Annotation_default_instance_; -class GeneratedCodeInfoDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class GeneratedCodeInfoDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _GeneratedCodeInfo_default_instance_; namespace protobuf_google_2fprotobuf_2fdescriptor_2eproto { @@ -81,44 +156,44 @@ const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[6]; } // 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 }, - { NULL, NULL, 0, -1, -1, false }, - { NULL, NULL, 0, -1, -1, false }, - { NULL, NULL, 0, -1, -1, false }, - { NULL, NULL, 0, -1, -1, false }, - { NULL, NULL, 0, -1, -1, false }, - { NULL, NULL, 0, -1, -1, false }, - { NULL, NULL, 0, -1, -1, false }, - { NULL, NULL, 0, -1, -1, false }, - { NULL, NULL, 0, -1, -1, false }, - { NULL, NULL, 0, -1, -1, false }, - { NULL, NULL, 0, -1, -1, false }, - { NULL, NULL, 0, -1, -1, false }, - { NULL, NULL, 0, -1, -1, false }, - { NULL, NULL, 0, -1, -1, false }, - { NULL, NULL, 0, -1, -1, false }, - { NULL, NULL, 0, -1, -1, false }, - { NULL, NULL, 0, -1, -1, false }, - { NULL, NULL, 0, -1, -1, false }, - { NULL, NULL, 0, -1, -1, false }, - { NULL, NULL, 0, -1, -1, false }, - { NULL, NULL, 0, -1, -1, false }, - { NULL, NULL, 0, -1, -1, false }, - { NULL, NULL, 0, -1, -1, false }, - { NULL, NULL, 0, -1, -1, false }, + TableStruct::schema[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, + { 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) = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorSet, _has_bits_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorSet, _internal_metadata_), ~0u, // no _extensions_ @@ -473,8 +548,7 @@ const ::google::protobuf::uint32 TableStruct::offsets[] = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GeneratedCodeInfo, annotation_), ~0u, }; - -static const ::google::protobuf::internal::MigrationSchema schemas[] = { +static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { { 0, 6, sizeof(FileDescriptorSet)}, { 7, 24, sizeof(FileDescriptorProto)}, { 36, 43, sizeof(DescriptorProto_ExtensionRange)}, @@ -552,106 +626,77 @@ void protobuf_RegisterTypes(const ::std::string&) { } } // namespace - -void TableStruct::Shutdown() { - _FileDescriptorSet_default_instance_.Shutdown(); - delete file_level_metadata[0].reflection; - _FileDescriptorProto_default_instance_.Shutdown(); - delete file_level_metadata[1].reflection; - _DescriptorProto_ExtensionRange_default_instance_.Shutdown(); - delete file_level_metadata[2].reflection; - _DescriptorProto_ReservedRange_default_instance_.Shutdown(); - delete file_level_metadata[3].reflection; - _DescriptorProto_default_instance_.Shutdown(); - delete file_level_metadata[4].reflection; - _FieldDescriptorProto_default_instance_.Shutdown(); - delete file_level_metadata[5].reflection; - _OneofDescriptorProto_default_instance_.Shutdown(); - delete file_level_metadata[6].reflection; - _EnumDescriptorProto_default_instance_.Shutdown(); - delete file_level_metadata[7].reflection; - _EnumValueDescriptorProto_default_instance_.Shutdown(); - delete file_level_metadata[8].reflection; - _ServiceDescriptorProto_default_instance_.Shutdown(); - delete file_level_metadata[9].reflection; - _MethodDescriptorProto_default_instance_.Shutdown(); - delete file_level_metadata[10].reflection; - _FileOptions_default_instance_.Shutdown(); - delete file_level_metadata[11].reflection; - _MessageOptions_default_instance_.Shutdown(); - delete file_level_metadata[12].reflection; - _FieldOptions_default_instance_.Shutdown(); - delete file_level_metadata[13].reflection; - _OneofOptions_default_instance_.Shutdown(); - delete file_level_metadata[14].reflection; - _EnumOptions_default_instance_.Shutdown(); - delete file_level_metadata[15].reflection; - _EnumValueOptions_default_instance_.Shutdown(); - delete file_level_metadata[16].reflection; - _ServiceOptions_default_instance_.Shutdown(); - delete file_level_metadata[17].reflection; - _MethodOptions_default_instance_.Shutdown(); - delete file_level_metadata[18].reflection; - _UninterpretedOption_NamePart_default_instance_.Shutdown(); - delete file_level_metadata[19].reflection; - _UninterpretedOption_default_instance_.Shutdown(); - delete file_level_metadata[20].reflection; - _SourceCodeInfo_Location_default_instance_.Shutdown(); - delete file_level_metadata[21].reflection; - _SourceCodeInfo_default_instance_.Shutdown(); - delete file_level_metadata[22].reflection; - _GeneratedCodeInfo_Annotation_default_instance_.Shutdown(); - delete file_level_metadata[23].reflection; - _GeneratedCodeInfo_default_instance_.Shutdown(); - delete file_level_metadata[24].reflection; -} - void TableStruct::InitDefaultsImpl() { GOOGLE_PROTOBUF_VERIFY_VERSION; ::google::protobuf::internal::InitProtobufDefaults(); - _FileDescriptorSet_default_instance_.DefaultConstruct(); - _FileDescriptorProto_default_instance_.DefaultConstruct(); - _DescriptorProto_ExtensionRange_default_instance_.DefaultConstruct(); - _DescriptorProto_ReservedRange_default_instance_.DefaultConstruct(); - _DescriptorProto_default_instance_.DefaultConstruct(); - _FieldDescriptorProto_default_instance_.DefaultConstruct(); - _OneofDescriptorProto_default_instance_.DefaultConstruct(); - _EnumDescriptorProto_default_instance_.DefaultConstruct(); - _EnumValueDescriptorProto_default_instance_.DefaultConstruct(); - _ServiceDescriptorProto_default_instance_.DefaultConstruct(); - _MethodDescriptorProto_default_instance_.DefaultConstruct(); - _FileOptions_default_instance_.DefaultConstruct(); - _MessageOptions_default_instance_.DefaultConstruct(); - _FieldOptions_default_instance_.DefaultConstruct(); - _OneofOptions_default_instance_.DefaultConstruct(); - _EnumOptions_default_instance_.DefaultConstruct(); - _EnumValueOptions_default_instance_.DefaultConstruct(); - _ServiceOptions_default_instance_.DefaultConstruct(); - _MethodOptions_default_instance_.DefaultConstruct(); - _UninterpretedOption_NamePart_default_instance_.DefaultConstruct(); - _UninterpretedOption_default_instance_.DefaultConstruct(); - _SourceCodeInfo_Location_default_instance_.DefaultConstruct(); - _SourceCodeInfo_default_instance_.DefaultConstruct(); - _GeneratedCodeInfo_Annotation_default_instance_.DefaultConstruct(); - _GeneratedCodeInfo_default_instance_.DefaultConstruct(); - _FileDescriptorProto_default_instance_.get_mutable()->options_ = const_cast< ::google::protobuf::FileOptions*>( + _FileDescriptorSet_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_FileDescriptorSet_default_instance_);_FileDescriptorProto_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_FileDescriptorProto_default_instance_);_DescriptorProto_ExtensionRange_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_DescriptorProto_ExtensionRange_default_instance_);_DescriptorProto_ReservedRange_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_DescriptorProto_ReservedRange_default_instance_);_DescriptorProto_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_DescriptorProto_default_instance_);_FieldDescriptorProto_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_FieldDescriptorProto_default_instance_);_OneofDescriptorProto_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_OneofDescriptorProto_default_instance_);_EnumDescriptorProto_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_EnumDescriptorProto_default_instance_);_EnumValueDescriptorProto_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_EnumValueDescriptorProto_default_instance_);_ServiceDescriptorProto_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_ServiceDescriptorProto_default_instance_);_MethodDescriptorProto_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_MethodDescriptorProto_default_instance_);_FileOptions_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_FileOptions_default_instance_);_MessageOptions_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_MessageOptions_default_instance_);_FieldOptions_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_FieldOptions_default_instance_);_OneofOptions_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_OneofOptions_default_instance_);_EnumOptions_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_EnumOptions_default_instance_);_EnumValueOptions_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_EnumValueOptions_default_instance_);_ServiceOptions_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_ServiceOptions_default_instance_);_MethodOptions_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_MethodOptions_default_instance_);_UninterpretedOption_NamePart_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_UninterpretedOption_NamePart_default_instance_);_UninterpretedOption_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_UninterpretedOption_default_instance_);_SourceCodeInfo_Location_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_SourceCodeInfo_Location_default_instance_);_SourceCodeInfo_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_SourceCodeInfo_default_instance_);_GeneratedCodeInfo_Annotation_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_GeneratedCodeInfo_Annotation_default_instance_);_GeneratedCodeInfo_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_GeneratedCodeInfo_default_instance_);_FileDescriptorProto_default_instance_._instance.get_mutable()->options_ = const_cast< ::google::protobuf::FileOptions*>( ::google::protobuf::FileOptions::internal_default_instance()); - _FileDescriptorProto_default_instance_.get_mutable()->source_code_info_ = const_cast< ::google::protobuf::SourceCodeInfo*>( + _FileDescriptorProto_default_instance_._instance.get_mutable()->source_code_info_ = const_cast< ::google::protobuf::SourceCodeInfo*>( ::google::protobuf::SourceCodeInfo::internal_default_instance()); - _DescriptorProto_default_instance_.get_mutable()->options_ = const_cast< ::google::protobuf::MessageOptions*>( + _DescriptorProto_default_instance_._instance.get_mutable()->options_ = const_cast< ::google::protobuf::MessageOptions*>( ::google::protobuf::MessageOptions::internal_default_instance()); - _FieldDescriptorProto_default_instance_.get_mutable()->options_ = const_cast< ::google::protobuf::FieldOptions*>( + _FieldDescriptorProto_default_instance_._instance.get_mutable()->options_ = const_cast< ::google::protobuf::FieldOptions*>( ::google::protobuf::FieldOptions::internal_default_instance()); - _OneofDescriptorProto_default_instance_.get_mutable()->options_ = const_cast< ::google::protobuf::OneofOptions*>( + _OneofDescriptorProto_default_instance_._instance.get_mutable()->options_ = const_cast< ::google::protobuf::OneofOptions*>( ::google::protobuf::OneofOptions::internal_default_instance()); - _EnumDescriptorProto_default_instance_.get_mutable()->options_ = const_cast< ::google::protobuf::EnumOptions*>( + _EnumDescriptorProto_default_instance_._instance.get_mutable()->options_ = const_cast< ::google::protobuf::EnumOptions*>( ::google::protobuf::EnumOptions::internal_default_instance()); - _EnumValueDescriptorProto_default_instance_.get_mutable()->options_ = const_cast< ::google::protobuf::EnumValueOptions*>( + _EnumValueDescriptorProto_default_instance_._instance.get_mutable()->options_ = const_cast< ::google::protobuf::EnumValueOptions*>( ::google::protobuf::EnumValueOptions::internal_default_instance()); - _ServiceDescriptorProto_default_instance_.get_mutable()->options_ = const_cast< ::google::protobuf::ServiceOptions*>( + _ServiceDescriptorProto_default_instance_._instance.get_mutable()->options_ = const_cast< ::google::protobuf::ServiceOptions*>( ::google::protobuf::ServiceOptions::internal_default_instance()); - _MethodDescriptorProto_default_instance_.get_mutable()->options_ = const_cast< ::google::protobuf::MethodOptions*>( + _MethodDescriptorProto_default_instance_._instance.get_mutable()->options_ = const_cast< ::google::protobuf::MethodOptions*>( ::google::protobuf::MethodOptions::internal_default_instance()); } @@ -659,9 +704,10 @@ void InitDefaults() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &TableStruct::InitDefaultsImpl); } +namespace { void AddDescriptorsImpl() { InitDefaults(); - static const char descriptor[] = { + static const char descriptor[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { "\n google/protobuf/descriptor.proto\022\017goog" "le.protobuf\"G\n\021FileDescriptorSet\0222\n\004file" "\030\001 \003(\0132$.google.protobuf.FileDescriptorP" @@ -807,14 +853,14 @@ void AddDescriptorsImpl() { descriptor, 5591); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "google/protobuf/descriptor.proto", &protobuf_RegisterTypes); - ::google::protobuf::internal::OnShutdown(&TableStruct::Shutdown); } +} // anonymous namespace void AddDescriptors() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl); } -// Force AddDescriptors() to be called at static initialization time. +// Force AddDescriptors() to be called at dynamic initialization time. struct StaticDescriptorInitializer { StaticDescriptorInitializer() { AddDescriptors(); @@ -1053,6 +1099,10 @@ FileDescriptorSet* FileDescriptorSet::New(::google::protobuf::Arena* arena) cons void FileDescriptorSet::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.FileDescriptorSet) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + file_.Clear(); _has_bits_.Clear(); _internal_metadata_.Clear(); @@ -1071,7 +1121,7 @@ bool FileDescriptorSet::MergePartialFromCodedStream( // repeated .google.protobuf.FileDescriptorProto file = 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::ReadMessageNoVirtual( input, add_file())); } else { @@ -1082,13 +1132,11 @@ bool FileDescriptorSet::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::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -1109,14 +1157,15 @@ void FileDescriptorSet::SerializeWithCachedSizes( (void) cached_has_bits; // repeated .google.protobuf.FileDescriptorProto file = 1; - for (unsigned int i = 0, n = this->file_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->file_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 1, this->file(i), output); + 1, this->file(static_cast(i)), output); } if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); + _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.FileDescriptorSet) } @@ -1129,15 +1178,16 @@ ::google::protobuf::uint8* FileDescriptorSet::InternalSerializeWithCachedSizesTo (void) cached_has_bits; // repeated .google.protobuf.FileDescriptorProto file = 1; - for (unsigned int i = 0, n = this->file_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->file_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageNoVirtualToArray( - 1, this->file(i), deterministic, target); + 1, this->file(static_cast(i)), deterministic, target); } if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); + _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FileDescriptorSet) return target; @@ -1150,16 +1200,16 @@ size_t FileDescriptorSet::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); + _internal_metadata_.unknown_fields()); } // repeated .google.protobuf.FileDescriptorProto file = 1; { - unsigned int count = this->file_size(); + unsigned int count = static_cast(this->file_size()); total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->file(i)); + this->file(static_cast(i))); } } @@ -1219,10 +1269,11 @@ void FileDescriptorSet::Swap(FileDescriptorSet* other) { InternalSwap(other); } void FileDescriptorSet::InternalSwap(FileDescriptorSet* other) { + using std::swap; file_.InternalSwap(&other->file_); - std::swap(_has_bits_[0], other->_has_bits_[0]); + swap(_has_bits_[0], other->_has_bits_[0]); _internal_metadata_.Swap(&other->_internal_metadata_); - std::swap(_cached_size_, other->_cached_size_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata FileDescriptorSet::GetMetadata() const { @@ -1333,8 +1384,9 @@ void FileDescriptorProto::SharedCtor() { name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); package_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); syntax_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - ::memset(&options_, 0, reinterpret_cast(&source_code_info_) - - reinterpret_cast(&options_) + sizeof(source_code_info_)); + ::memset(&options_, 0, static_cast( + reinterpret_cast(&source_code_info_) - + reinterpret_cast(&options_)) + sizeof(source_code_info_)); } FileDescriptorProto::~FileDescriptorProto() { @@ -1346,12 +1398,8 @@ void FileDescriptorProto::SharedDtor() { name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); package_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); syntax_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - if (this != internal_default_instance()) { - delete options_; - } - if (this != internal_default_instance()) { - delete source_code_info_; - } + if (this != internal_default_instance()) delete options_; + if (this != internal_default_instance()) delete source_code_info_; } void FileDescriptorProto::SetCachedSize(int size) const { @@ -1379,6 +1427,10 @@ FileDescriptorProto* FileDescriptorProto::New(::google::protobuf::Arena* arena) void FileDescriptorProto::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.FileDescriptorProto) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + dependency_.Clear(); message_type_.Clear(); enum_type_.Clear(); @@ -1386,24 +1438,25 @@ void FileDescriptorProto::Clear() { extension_.Clear(); public_dependency_.Clear(); weak_dependency_.Clear(); - if (_has_bits_[0 / 32] & 31u) { - if (has_name()) { + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 31u) { + if (cached_has_bits & 0x00000001u) { GOOGLE_DCHECK(!name_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); (*name_.UnsafeRawStringPointer())->clear(); } - if (has_package()) { + if (cached_has_bits & 0x00000002u) { GOOGLE_DCHECK(!package_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); (*package_.UnsafeRawStringPointer())->clear(); } - if (has_syntax()) { + if (cached_has_bits & 0x00000004u) { GOOGLE_DCHECK(!syntax_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); (*syntax_.UnsafeRawStringPointer())->clear(); } - if (has_options()) { + if (cached_has_bits & 0x00000008u) { GOOGLE_DCHECK(options_ != NULL); options_->::google::protobuf::FileOptions::Clear(); } - if (has_source_code_info()) { + if (cached_has_bits & 0x00000010u) { GOOGLE_DCHECK(source_code_info_ != NULL); source_code_info_->::google::protobuf::SourceCodeInfo::Clear(); } @@ -1425,11 +1478,11 @@ bool FileDescriptorProto::MergePartialFromCodedStream( // optional string name = 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->mutable_name())); ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), this->name().length(), + this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormat::PARSE, "google.protobuf.FileDescriptorProto.name"); } else { @@ -1441,11 +1494,11 @@ bool FileDescriptorProto::MergePartialFromCodedStream( // optional string package = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(18u)) { + static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_package())); ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->package().data(), this->package().length(), + this->package().data(), static_cast(this->package().length()), ::google::protobuf::internal::WireFormat::PARSE, "google.protobuf.FileDescriptorProto.package"); } else { @@ -1457,12 +1510,12 @@ bool FileDescriptorProto::MergePartialFromCodedStream( // repeated string dependency = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(26u)) { + static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->add_dependency())); ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( this->dependency(this->dependency_size() - 1).data(), - this->dependency(this->dependency_size() - 1).length(), + static_cast(this->dependency(this->dependency_size() - 1).length()), ::google::protobuf::internal::WireFormat::PARSE, "google.protobuf.FileDescriptorProto.dependency"); } else { @@ -1474,7 +1527,7 @@ bool FileDescriptorProto::MergePartialFromCodedStream( // repeated .google.protobuf.DescriptorProto message_type = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(34u)) { + static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, add_message_type())); } else { @@ -1486,7 +1539,7 @@ bool FileDescriptorProto::MergePartialFromCodedStream( // repeated .google.protobuf.EnumDescriptorProto enum_type = 5; case 5: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(42u)) { + static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, add_enum_type())); } else { @@ -1498,7 +1551,7 @@ bool FileDescriptorProto::MergePartialFromCodedStream( // repeated .google.protobuf.ServiceDescriptorProto service = 6; case 6: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(50u)) { + static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, add_service())); } else { @@ -1510,7 +1563,7 @@ bool FileDescriptorProto::MergePartialFromCodedStream( // repeated .google.protobuf.FieldDescriptorProto extension = 7; case 7: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(58u)) { + static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, add_extension())); } else { @@ -1522,7 +1575,7 @@ bool FileDescriptorProto::MergePartialFromCodedStream( // optional .google.protobuf.FileOptions options = 8; case 8: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(66u)) { + static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_options())); } else { @@ -1534,7 +1587,7 @@ bool FileDescriptorProto::MergePartialFromCodedStream( // optional .google.protobuf.SourceCodeInfo source_code_info = 9; case 9: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(74u)) { + static_cast< ::google::protobuf::uint8>(74u /* 74 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_source_code_info())); } else { @@ -1546,12 +1599,13 @@ bool FileDescriptorProto::MergePartialFromCodedStream( // repeated int32 public_dependency = 10; case 10: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(80u)) { + static_cast< ::google::protobuf::uint8>(80u /* 80 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( 1, 80u, input, this->mutable_public_dependency()))); - } else if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(82u)) { + } else if ( + static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(82u /* 82 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, this->mutable_public_dependency()))); @@ -1564,12 +1618,13 @@ bool FileDescriptorProto::MergePartialFromCodedStream( // repeated int32 weak_dependency = 11; case 11: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(88u)) { + static_cast< ::google::protobuf::uint8>(88u /* 88 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( 1, 88u, input, this->mutable_weak_dependency()))); - } else if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(90u)) { + } else if ( + static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(90u /* 90 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, this->mutable_weak_dependency()))); @@ -1582,11 +1637,11 @@ bool FileDescriptorProto::MergePartialFromCodedStream( // optional string syntax = 12; case 12: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(98u)) { + static_cast< ::google::protobuf::uint8>(98u /* 98 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_syntax())); ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->syntax().data(), this->syntax().length(), + this->syntax().data(), static_cast(this->syntax().length()), ::google::protobuf::internal::WireFormat::PARSE, "google.protobuf.FileDescriptorProto.syntax"); } else { @@ -1597,13 +1652,11 @@ bool FileDescriptorProto::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::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -1627,7 +1680,7 @@ void FileDescriptorProto::SerializeWithCachedSizes( // optional string name = 1; if (cached_has_bits & 0x00000001u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), this->name().length(), + this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.FileDescriptorProto.name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( @@ -1637,7 +1690,7 @@ void FileDescriptorProto::SerializeWithCachedSizes( // optional string package = 2; if (cached_has_bits & 0x00000002u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->package().data(), this->package().length(), + this->package().data(), static_cast(this->package().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.FileDescriptorProto.package"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( @@ -1647,7 +1700,7 @@ void FileDescriptorProto::SerializeWithCachedSizes( // repeated string dependency = 3; for (int i = 0, n = this->dependency_size(); i < n; i++) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->dependency(i).data(), this->dependency(i).length(), + this->dependency(i).data(), static_cast(this->dependency(i).length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.FileDescriptorProto.dependency"); ::google::protobuf::internal::WireFormatLite::WriteString( @@ -1655,27 +1708,31 @@ void FileDescriptorProto::SerializeWithCachedSizes( } // repeated .google.protobuf.DescriptorProto message_type = 4; - for (unsigned int i = 0, n = this->message_type_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->message_type_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 4, this->message_type(i), output); + 4, this->message_type(static_cast(i)), output); } // repeated .google.protobuf.EnumDescriptorProto enum_type = 5; - for (unsigned int i = 0, n = this->enum_type_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->enum_type_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 5, this->enum_type(i), output); + 5, this->enum_type(static_cast(i)), output); } // repeated .google.protobuf.ServiceDescriptorProto service = 6; - for (unsigned int i = 0, n = this->service_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->service_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 6, this->service(i), output); + 6, this->service(static_cast(i)), output); } // repeated .google.protobuf.FieldDescriptorProto extension = 7; - for (unsigned int i = 0, n = this->extension_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->extension_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 7, this->extension(i), output); + 7, this->extension(static_cast(i)), output); } // optional .google.protobuf.FileOptions options = 8; @@ -1705,7 +1762,7 @@ void FileDescriptorProto::SerializeWithCachedSizes( // optional string syntax = 12; if (cached_has_bits & 0x00000004u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->syntax().data(), this->syntax().length(), + this->syntax().data(), static_cast(this->syntax().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.FileDescriptorProto.syntax"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( @@ -1714,7 +1771,7 @@ void FileDescriptorProto::SerializeWithCachedSizes( if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); + _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.FileDescriptorProto) } @@ -1730,7 +1787,7 @@ ::google::protobuf::uint8* FileDescriptorProto::InternalSerializeWithCachedSizes // optional string name = 1; if (cached_has_bits & 0x00000001u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), this->name().length(), + this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.FileDescriptorProto.name"); target = @@ -1741,7 +1798,7 @@ ::google::protobuf::uint8* FileDescriptorProto::InternalSerializeWithCachedSizes // optional string package = 2; if (cached_has_bits & 0x00000002u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->package().data(), this->package().length(), + this->package().data(), static_cast(this->package().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.FileDescriptorProto.package"); target = @@ -1752,7 +1809,7 @@ ::google::protobuf::uint8* FileDescriptorProto::InternalSerializeWithCachedSizes // repeated string dependency = 3; for (int i = 0, n = this->dependency_size(); i < n; i++) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->dependency(i).data(), this->dependency(i).length(), + this->dependency(i).data(), static_cast(this->dependency(i).length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.FileDescriptorProto.dependency"); target = ::google::protobuf::internal::WireFormatLite:: @@ -1760,31 +1817,35 @@ ::google::protobuf::uint8* FileDescriptorProto::InternalSerializeWithCachedSizes } // repeated .google.protobuf.DescriptorProto message_type = 4; - for (unsigned int i = 0, n = this->message_type_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->message_type_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageNoVirtualToArray( - 4, this->message_type(i), deterministic, target); + 4, this->message_type(static_cast(i)), deterministic, target); } // repeated .google.protobuf.EnumDescriptorProto enum_type = 5; - for (unsigned int i = 0, n = this->enum_type_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->enum_type_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageNoVirtualToArray( - 5, this->enum_type(i), deterministic, target); + 5, this->enum_type(static_cast(i)), deterministic, target); } // repeated .google.protobuf.ServiceDescriptorProto service = 6; - for (unsigned int i = 0, n = this->service_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->service_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageNoVirtualToArray( - 6, this->service(i), deterministic, target); + 6, this->service(static_cast(i)), deterministic, target); } // repeated .google.protobuf.FieldDescriptorProto extension = 7; - for (unsigned int i = 0, n = this->extension_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->extension_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageNoVirtualToArray( - 7, this->extension(i), deterministic, target); + 7, this->extension(static_cast(i)), deterministic, target); } // optional .google.protobuf.FileOptions options = 8; @@ -1812,7 +1873,7 @@ ::google::protobuf::uint8* FileDescriptorProto::InternalSerializeWithCachedSizes // optional string syntax = 12; if (cached_has_bits & 0x00000004u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->syntax().data(), this->syntax().length(), + this->syntax().data(), static_cast(this->syntax().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.FileDescriptorProto.syntax"); target = @@ -1822,7 +1883,7 @@ ::google::protobuf::uint8* FileDescriptorProto::InternalSerializeWithCachedSizes if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); + _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FileDescriptorProto) return target; @@ -1835,7 +1896,7 @@ size_t FileDescriptorProto::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); + _internal_metadata_.unknown_fields()); } // repeated string dependency = 3; total_size += 1 * @@ -1847,45 +1908,45 @@ size_t FileDescriptorProto::ByteSizeLong() const { // repeated .google.protobuf.DescriptorProto message_type = 4; { - unsigned int count = this->message_type_size(); + unsigned int count = static_cast(this->message_type_size()); total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->message_type(i)); + this->message_type(static_cast(i))); } } // repeated .google.protobuf.EnumDescriptorProto enum_type = 5; { - unsigned int count = this->enum_type_size(); + unsigned int count = static_cast(this->enum_type_size()); total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->enum_type(i)); + this->enum_type(static_cast(i))); } } // repeated .google.protobuf.ServiceDescriptorProto service = 6; { - unsigned int count = this->service_size(); + unsigned int count = static_cast(this->service_size()); total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->service(i)); + this->service(static_cast(i))); } } // repeated .google.protobuf.FieldDescriptorProto extension = 7; { - unsigned int count = this->extension_size(); + unsigned int count = static_cast(this->extension_size()); total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->extension(i)); + this->extension(static_cast(i))); } } @@ -2033,6 +2094,7 @@ void FileDescriptorProto::Swap(FileDescriptorProto* other) { InternalSwap(other); } void FileDescriptorProto::InternalSwap(FileDescriptorProto* other) { + using std::swap; dependency_.InternalSwap(&other->dependency_); message_type_.InternalSwap(&other->message_type_); enum_type_.InternalSwap(&other->enum_type_); @@ -2043,11 +2105,11 @@ void FileDescriptorProto::InternalSwap(FileDescriptorProto* other) { name_.Swap(&other->name_); package_.Swap(&other->package_); syntax_.Swap(&other->syntax_); - std::swap(options_, other->options_); - std::swap(source_code_info_, other->source_code_info_); - std::swap(_has_bits_[0], other->_has_bits_[0]); + swap(options_, other->options_); + swap(source_code_info_, other->source_code_info_); + swap(_has_bits_[0], other->_has_bits_[0]); _internal_metadata_.Swap(&other->_internal_metadata_); - std::swap(_cached_size_, other->_cached_size_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata FileDescriptorProto::GetMetadata() const { @@ -2448,9 +2510,10 @@ void FileDescriptorProto::clear_options() { clear_has_options(); } const ::google::protobuf::FileOptions& FileDescriptorProto::options() const { + const ::google::protobuf::FileOptions* p = options_; // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.options) - return options_ != NULL ? *options_ - : *::google::protobuf::FileOptions::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::google::protobuf::_FileOptions_default_instance_); } ::google::protobuf::FileOptions* FileDescriptorProto::mutable_options() { set_has_options(); @@ -2493,9 +2556,10 @@ void FileDescriptorProto::clear_source_code_info() { clear_has_source_code_info(); } const ::google::protobuf::SourceCodeInfo& FileDescriptorProto::source_code_info() const { + const ::google::protobuf::SourceCodeInfo* p = source_code_info_; // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.source_code_info) - return source_code_info_ != NULL ? *source_code_info_ - : *::google::protobuf::SourceCodeInfo::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::google::protobuf::_SourceCodeInfo_default_instance_); } ::google::protobuf::SourceCodeInfo* FileDescriptorProto::mutable_source_code_info() { set_has_source_code_info(); @@ -2610,15 +2674,16 @@ DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange(const DescriptorP _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); ::memcpy(&start_, &from.start_, - reinterpret_cast(&end_) - - reinterpret_cast(&start_) + sizeof(end_)); + static_cast(reinterpret_cast(&end_) - + reinterpret_cast(&start_)) + sizeof(end_)); // @@protoc_insertion_point(copy_constructor:google.protobuf.DescriptorProto.ExtensionRange) } void DescriptorProto_ExtensionRange::SharedCtor() { _cached_size_ = 0; - ::memset(&start_, 0, reinterpret_cast(&end_) - - reinterpret_cast(&start_) + sizeof(end_)); + ::memset(&start_, 0, static_cast( + reinterpret_cast(&end_) - + reinterpret_cast(&start_)) + sizeof(end_)); } DescriptorProto_ExtensionRange::~DescriptorProto_ExtensionRange() { @@ -2654,9 +2719,15 @@ DescriptorProto_ExtensionRange* DescriptorProto_ExtensionRange::New(::google::pr void DescriptorProto_ExtensionRange::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.DescriptorProto.ExtensionRange) - if (_has_bits_[0 / 32] & 3u) { - ::memset(&start_, 0, reinterpret_cast(&end_) - - reinterpret_cast(&start_) + sizeof(end_)); + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 3u) { + ::memset(&start_, 0, static_cast( + reinterpret_cast(&end_) - + reinterpret_cast(&start_)) + sizeof(end_)); } _has_bits_.Clear(); _internal_metadata_.Clear(); @@ -2675,7 +2746,7 @@ bool DescriptorProto_ExtensionRange::MergePartialFromCodedStream( // optional int32 start = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(8u)) { + static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { set_has_start(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( @@ -2689,7 +2760,7 @@ bool DescriptorProto_ExtensionRange::MergePartialFromCodedStream( // optional int32 end = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(16u)) { + static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { set_has_end(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( @@ -2702,13 +2773,11 @@ bool DescriptorProto_ExtensionRange::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::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -2741,7 +2810,7 @@ void DescriptorProto_ExtensionRange::SerializeWithCachedSizes( if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); + _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.DescriptorProto.ExtensionRange) } @@ -2766,7 +2835,7 @@ ::google::protobuf::uint8* DescriptorProto_ExtensionRange::InternalSerializeWith if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); + _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.DescriptorProto.ExtensionRange) return target; @@ -2779,7 +2848,7 @@ size_t DescriptorProto_ExtensionRange::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); + _internal_metadata_.unknown_fields()); } if (_has_bits_[0 / 32] & 3u) { // optional int32 start = 1; @@ -2861,11 +2930,12 @@ void DescriptorProto_ExtensionRange::Swap(DescriptorProto_ExtensionRange* other) InternalSwap(other); } void DescriptorProto_ExtensionRange::InternalSwap(DescriptorProto_ExtensionRange* other) { - std::swap(start_, other->start_); - std::swap(end_, other->end_); - std::swap(_has_bits_[0], other->_has_bits_[0]); + using std::swap; + swap(start_, other->start_); + swap(end_, other->end_); + swap(_has_bits_[0], other->_has_bits_[0]); _internal_metadata_.Swap(&other->_internal_metadata_); - std::swap(_cached_size_, other->_cached_size_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata DescriptorProto_ExtensionRange::GetMetadata() const { @@ -2948,15 +3018,16 @@ DescriptorProto_ReservedRange::DescriptorProto_ReservedRange(const DescriptorPro _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); ::memcpy(&start_, &from.start_, - reinterpret_cast(&end_) - - reinterpret_cast(&start_) + sizeof(end_)); + static_cast(reinterpret_cast(&end_) - + reinterpret_cast(&start_)) + sizeof(end_)); // @@protoc_insertion_point(copy_constructor:google.protobuf.DescriptorProto.ReservedRange) } void DescriptorProto_ReservedRange::SharedCtor() { _cached_size_ = 0; - ::memset(&start_, 0, reinterpret_cast(&end_) - - reinterpret_cast(&start_) + sizeof(end_)); + ::memset(&start_, 0, static_cast( + reinterpret_cast(&end_) - + reinterpret_cast(&start_)) + sizeof(end_)); } DescriptorProto_ReservedRange::~DescriptorProto_ReservedRange() { @@ -2992,9 +3063,15 @@ DescriptorProto_ReservedRange* DescriptorProto_ReservedRange::New(::google::prot void DescriptorProto_ReservedRange::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.DescriptorProto.ReservedRange) - if (_has_bits_[0 / 32] & 3u) { - ::memset(&start_, 0, reinterpret_cast(&end_) - - reinterpret_cast(&start_) + sizeof(end_)); + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 3u) { + ::memset(&start_, 0, static_cast( + reinterpret_cast(&end_) - + reinterpret_cast(&start_)) + sizeof(end_)); } _has_bits_.Clear(); _internal_metadata_.Clear(); @@ -3013,7 +3090,7 @@ bool DescriptorProto_ReservedRange::MergePartialFromCodedStream( // optional int32 start = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(8u)) { + static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { set_has_start(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( @@ -3027,7 +3104,7 @@ bool DescriptorProto_ReservedRange::MergePartialFromCodedStream( // optional int32 end = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(16u)) { + static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { set_has_end(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( @@ -3040,13 +3117,11 @@ bool DescriptorProto_ReservedRange::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::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -3079,7 +3154,7 @@ void DescriptorProto_ReservedRange::SerializeWithCachedSizes( if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); + _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.DescriptorProto.ReservedRange) } @@ -3104,7 +3179,7 @@ ::google::protobuf::uint8* DescriptorProto_ReservedRange::InternalSerializeWithC if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); + _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.DescriptorProto.ReservedRange) return target; @@ -3117,7 +3192,7 @@ size_t DescriptorProto_ReservedRange::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); + _internal_metadata_.unknown_fields()); } if (_has_bits_[0 / 32] & 3u) { // optional int32 start = 1; @@ -3199,11 +3274,12 @@ void DescriptorProto_ReservedRange::Swap(DescriptorProto_ReservedRange* other) { InternalSwap(other); } void DescriptorProto_ReservedRange::InternalSwap(DescriptorProto_ReservedRange* other) { - std::swap(start_, other->start_); - std::swap(end_, other->end_); - std::swap(_has_bits_[0], other->_has_bits_[0]); + using std::swap; + swap(start_, other->start_); + swap(end_, other->end_); + swap(_has_bits_[0], other->_has_bits_[0]); _internal_metadata_.Swap(&other->_internal_metadata_); - std::swap(_cached_size_, other->_cached_size_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata DescriptorProto_ReservedRange::GetMetadata() const { @@ -3326,9 +3402,7 @@ DescriptorProto::~DescriptorProto() { void DescriptorProto::SharedDtor() { name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - if (this != internal_default_instance()) { - delete options_; - } + if (this != internal_default_instance()) delete options_; } void DescriptorProto::SetCachedSize(int size) const { @@ -3356,6 +3430,10 @@ DescriptorProto* DescriptorProto::New(::google::protobuf::Arena* arena) const { void DescriptorProto::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.DescriptorProto) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + field_.Clear(); nested_type_.Clear(); enum_type_.Clear(); @@ -3364,12 +3442,13 @@ void DescriptorProto::Clear() { oneof_decl_.Clear(); reserved_range_.Clear(); reserved_name_.Clear(); - if (_has_bits_[0 / 32] & 3u) { - if (has_name()) { + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 3u) { + if (cached_has_bits & 0x00000001u) { GOOGLE_DCHECK(!name_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); (*name_.UnsafeRawStringPointer())->clear(); } - if (has_options()) { + if (cached_has_bits & 0x00000002u) { GOOGLE_DCHECK(options_ != NULL); options_->::google::protobuf::MessageOptions::Clear(); } @@ -3391,11 +3470,11 @@ bool DescriptorProto::MergePartialFromCodedStream( // optional string name = 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->mutable_name())); ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), this->name().length(), + this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormat::PARSE, "google.protobuf.DescriptorProto.name"); } else { @@ -3407,7 +3486,7 @@ bool DescriptorProto::MergePartialFromCodedStream( // repeated .google.protobuf.FieldDescriptorProto field = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(18u)) { + static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, add_field())); } else { @@ -3419,7 +3498,7 @@ bool DescriptorProto::MergePartialFromCodedStream( // repeated .google.protobuf.DescriptorProto nested_type = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(26u)) { + static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, add_nested_type())); } else { @@ -3431,7 +3510,7 @@ bool DescriptorProto::MergePartialFromCodedStream( // repeated .google.protobuf.EnumDescriptorProto enum_type = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(34u)) { + static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, add_enum_type())); } else { @@ -3443,7 +3522,7 @@ bool DescriptorProto::MergePartialFromCodedStream( // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; case 5: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(42u)) { + static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, add_extension_range())); } else { @@ -3455,7 +3534,7 @@ bool DescriptorProto::MergePartialFromCodedStream( // repeated .google.protobuf.FieldDescriptorProto extension = 6; case 6: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(50u)) { + static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, add_extension())); } else { @@ -3467,7 +3546,7 @@ bool DescriptorProto::MergePartialFromCodedStream( // optional .google.protobuf.MessageOptions options = 7; case 7: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(58u)) { + static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_options())); } else { @@ -3479,7 +3558,7 @@ bool DescriptorProto::MergePartialFromCodedStream( // repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8; case 8: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(66u)) { + static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, add_oneof_decl())); } else { @@ -3491,7 +3570,7 @@ bool DescriptorProto::MergePartialFromCodedStream( // repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9; case 9: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(74u)) { + static_cast< ::google::protobuf::uint8>(74u /* 74 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, add_reserved_range())); } else { @@ -3503,12 +3582,12 @@ bool DescriptorProto::MergePartialFromCodedStream( // repeated string reserved_name = 10; case 10: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(82u)) { + static_cast< ::google::protobuf::uint8>(82u /* 82 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->add_reserved_name())); ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( this->reserved_name(this->reserved_name_size() - 1).data(), - this->reserved_name(this->reserved_name_size() - 1).length(), + static_cast(this->reserved_name(this->reserved_name_size() - 1).length()), ::google::protobuf::internal::WireFormat::PARSE, "google.protobuf.DescriptorProto.reserved_name"); } else { @@ -3519,13 +3598,11 @@ bool DescriptorProto::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::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -3549,7 +3626,7 @@ void DescriptorProto::SerializeWithCachedSizes( // optional string name = 1; if (cached_has_bits & 0x00000001u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), this->name().length(), + this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.DescriptorProto.name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( @@ -3557,33 +3634,38 @@ void DescriptorProto::SerializeWithCachedSizes( } // repeated .google.protobuf.FieldDescriptorProto field = 2; - for (unsigned int i = 0, n = this->field_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->field_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 2, this->field(i), output); + 2, this->field(static_cast(i)), output); } // repeated .google.protobuf.DescriptorProto nested_type = 3; - for (unsigned int i = 0, n = this->nested_type_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->nested_type_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 3, this->nested_type(i), output); + 3, this->nested_type(static_cast(i)), output); } // repeated .google.protobuf.EnumDescriptorProto enum_type = 4; - for (unsigned int i = 0, n = this->enum_type_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->enum_type_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 4, this->enum_type(i), output); + 4, this->enum_type(static_cast(i)), output); } // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; - for (unsigned int i = 0, n = this->extension_range_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->extension_range_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 5, this->extension_range(i), output); + 5, this->extension_range(static_cast(i)), output); } // repeated .google.protobuf.FieldDescriptorProto extension = 6; - for (unsigned int i = 0, n = this->extension_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->extension_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 6, this->extension(i), output); + 6, this->extension(static_cast(i)), output); } // optional .google.protobuf.MessageOptions options = 7; @@ -3593,21 +3675,23 @@ void DescriptorProto::SerializeWithCachedSizes( } // repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8; - for (unsigned int i = 0, n = this->oneof_decl_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->oneof_decl_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 8, this->oneof_decl(i), output); + 8, this->oneof_decl(static_cast(i)), output); } // repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9; - for (unsigned int i = 0, n = this->reserved_range_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->reserved_range_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 9, this->reserved_range(i), output); + 9, this->reserved_range(static_cast(i)), output); } // repeated string reserved_name = 10; for (int i = 0, n = this->reserved_name_size(); i < n; i++) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->reserved_name(i).data(), this->reserved_name(i).length(), + this->reserved_name(i).data(), static_cast(this->reserved_name(i).length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.DescriptorProto.reserved_name"); ::google::protobuf::internal::WireFormatLite::WriteString( @@ -3616,7 +3700,7 @@ void DescriptorProto::SerializeWithCachedSizes( if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); + _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.DescriptorProto) } @@ -3632,7 +3716,7 @@ ::google::protobuf::uint8* DescriptorProto::InternalSerializeWithCachedSizesToAr // optional string name = 1; if (cached_has_bits & 0x00000001u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), this->name().length(), + this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.DescriptorProto.name"); target = @@ -3641,38 +3725,43 @@ ::google::protobuf::uint8* DescriptorProto::InternalSerializeWithCachedSizesToAr } // repeated .google.protobuf.FieldDescriptorProto field = 2; - for (unsigned int i = 0, n = this->field_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->field_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageNoVirtualToArray( - 2, this->field(i), deterministic, target); + 2, this->field(static_cast(i)), deterministic, target); } // repeated .google.protobuf.DescriptorProto nested_type = 3; - for (unsigned int i = 0, n = this->nested_type_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->nested_type_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageNoVirtualToArray( - 3, this->nested_type(i), deterministic, target); + 3, this->nested_type(static_cast(i)), deterministic, target); } // repeated .google.protobuf.EnumDescriptorProto enum_type = 4; - for (unsigned int i = 0, n = this->enum_type_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->enum_type_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageNoVirtualToArray( - 4, this->enum_type(i), deterministic, target); + 4, this->enum_type(static_cast(i)), deterministic, target); } // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; - for (unsigned int i = 0, n = this->extension_range_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->extension_range_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageNoVirtualToArray( - 5, this->extension_range(i), deterministic, target); + 5, this->extension_range(static_cast(i)), deterministic, target); } // repeated .google.protobuf.FieldDescriptorProto extension = 6; - for (unsigned int i = 0, n = this->extension_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->extension_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageNoVirtualToArray( - 6, this->extension(i), deterministic, target); + 6, this->extension(static_cast(i)), deterministic, target); } // optional .google.protobuf.MessageOptions options = 7; @@ -3683,23 +3772,25 @@ ::google::protobuf::uint8* DescriptorProto::InternalSerializeWithCachedSizesToAr } // repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8; - for (unsigned int i = 0, n = this->oneof_decl_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->oneof_decl_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageNoVirtualToArray( - 8, this->oneof_decl(i), deterministic, target); + 8, this->oneof_decl(static_cast(i)), deterministic, target); } // repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9; - for (unsigned int i = 0, n = this->reserved_range_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->reserved_range_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageNoVirtualToArray( - 9, this->reserved_range(i), deterministic, target); + 9, this->reserved_range(static_cast(i)), deterministic, target); } // repeated string reserved_name = 10; for (int i = 0, n = this->reserved_name_size(); i < n; i++) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->reserved_name(i).data(), this->reserved_name(i).length(), + this->reserved_name(i).data(), static_cast(this->reserved_name(i).length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.DescriptorProto.reserved_name"); target = ::google::protobuf::internal::WireFormatLite:: @@ -3708,7 +3799,7 @@ ::google::protobuf::uint8* DescriptorProto::InternalSerializeWithCachedSizesToAr if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); + _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.DescriptorProto) return target; @@ -3721,82 +3812,82 @@ size_t DescriptorProto::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); + _internal_metadata_.unknown_fields()); } // repeated .google.protobuf.FieldDescriptorProto field = 2; { - unsigned int count = this->field_size(); + unsigned int count = static_cast(this->field_size()); total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->field(i)); + this->field(static_cast(i))); } } // repeated .google.protobuf.DescriptorProto nested_type = 3; { - unsigned int count = this->nested_type_size(); + unsigned int count = static_cast(this->nested_type_size()); total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->nested_type(i)); + this->nested_type(static_cast(i))); } } // repeated .google.protobuf.EnumDescriptorProto enum_type = 4; { - unsigned int count = this->enum_type_size(); + unsigned int count = static_cast(this->enum_type_size()); total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->enum_type(i)); + this->enum_type(static_cast(i))); } } // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; { - unsigned int count = this->extension_range_size(); + unsigned int count = static_cast(this->extension_range_size()); total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->extension_range(i)); + this->extension_range(static_cast(i))); } } // repeated .google.protobuf.FieldDescriptorProto extension = 6; { - unsigned int count = this->extension_size(); + unsigned int count = static_cast(this->extension_size()); total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->extension(i)); + this->extension(static_cast(i))); } } // repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8; { - unsigned int count = this->oneof_decl_size(); + unsigned int count = static_cast(this->oneof_decl_size()); total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->oneof_decl(i)); + this->oneof_decl(static_cast(i))); } } // repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9; { - unsigned int count = this->reserved_range_size(); + unsigned int count = static_cast(this->reserved_range_size()); total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->reserved_range(i)); + this->reserved_range(static_cast(i))); } } @@ -3904,6 +3995,7 @@ void DescriptorProto::Swap(DescriptorProto* other) { InternalSwap(other); } void DescriptorProto::InternalSwap(DescriptorProto* other) { + using std::swap; field_.InternalSwap(&other->field_); nested_type_.InternalSwap(&other->nested_type_); enum_type_.InternalSwap(&other->enum_type_); @@ -3913,10 +4005,10 @@ void DescriptorProto::InternalSwap(DescriptorProto* other) { reserved_range_.InternalSwap(&other->reserved_range_); reserved_name_.InternalSwap(&other->reserved_name_); name_.Swap(&other->name_); - std::swap(options_, other->options_); - std::swap(_has_bits_[0], other->_has_bits_[0]); + swap(options_, other->options_); + swap(_has_bits_[0], other->_has_bits_[0]); _internal_metadata_.Swap(&other->_internal_metadata_); - std::swap(_cached_size_, other->_cached_size_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata DescriptorProto::GetMetadata() const { @@ -4185,9 +4277,10 @@ void DescriptorProto::clear_options() { clear_has_options(); } const ::google::protobuf::MessageOptions& DescriptorProto::options() const { + const ::google::protobuf::MessageOptions* p = options_; // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.options) - return options_ != NULL ? *options_ - : *::google::protobuf::MessageOptions::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::google::protobuf::_MessageOptions_default_instance_); } ::google::protobuf::MessageOptions* DescriptorProto::mutable_options() { set_has_options(); @@ -4371,8 +4464,8 @@ FieldDescriptorProto::FieldDescriptorProto(const FieldDescriptorProto& from) options_ = NULL; } ::memcpy(&number_, &from.number_, - reinterpret_cast(&type_) - - reinterpret_cast(&number_) + sizeof(type_)); + static_cast(reinterpret_cast(&type_) - + reinterpret_cast(&number_)) + sizeof(type_)); // @@protoc_insertion_point(copy_constructor:google.protobuf.FieldDescriptorProto) } @@ -4383,8 +4476,9 @@ void FieldDescriptorProto::SharedCtor() { type_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); default_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); json_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - ::memset(&options_, 0, reinterpret_cast(&oneof_index_) - - reinterpret_cast(&options_) + sizeof(oneof_index_)); + ::memset(&options_, 0, static_cast( + reinterpret_cast(&oneof_index_) - + reinterpret_cast(&options_)) + sizeof(oneof_index_)); label_ = 1; type_ = 1; } @@ -4400,9 +4494,7 @@ void FieldDescriptorProto::SharedDtor() { type_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); default_value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); json_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - if (this != internal_default_instance()) { - delete options_; - } + if (this != internal_default_instance()) delete options_; } void FieldDescriptorProto::SetCachedSize(int size) const { @@ -4430,37 +4522,43 @@ FieldDescriptorProto* FieldDescriptorProto::New(::google::protobuf::Arena* arena void FieldDescriptorProto::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.FieldDescriptorProto) - if (_has_bits_[0 / 32] & 63u) { - if (has_name()) { + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 63u) { + if (cached_has_bits & 0x00000001u) { GOOGLE_DCHECK(!name_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); (*name_.UnsafeRawStringPointer())->clear(); } - if (has_extendee()) { + if (cached_has_bits & 0x00000002u) { GOOGLE_DCHECK(!extendee_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); (*extendee_.UnsafeRawStringPointer())->clear(); } - if (has_type_name()) { + if (cached_has_bits & 0x00000004u) { GOOGLE_DCHECK(!type_name_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); (*type_name_.UnsafeRawStringPointer())->clear(); } - if (has_default_value()) { + if (cached_has_bits & 0x00000008u) { GOOGLE_DCHECK(!default_value_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); (*default_value_.UnsafeRawStringPointer())->clear(); } - if (has_json_name()) { + if (cached_has_bits & 0x00000010u) { GOOGLE_DCHECK(!json_name_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); (*json_name_.UnsafeRawStringPointer())->clear(); } - if (has_options()) { + if (cached_has_bits & 0x00000020u) { GOOGLE_DCHECK(options_ != NULL); options_->::google::protobuf::FieldOptions::Clear(); } } - if (_has_bits_[0 / 32] & 192u) { - ::memset(&number_, 0, reinterpret_cast(&oneof_index_) - - reinterpret_cast(&number_) + sizeof(oneof_index_)); + if (cached_has_bits & 192u) { + ::memset(&number_, 0, static_cast( + reinterpret_cast(&oneof_index_) - + reinterpret_cast(&number_)) + sizeof(oneof_index_)); } - if (_has_bits_[8 / 32] & 768u) { + if (cached_has_bits & 768u) { label_ = 1; type_ = 1; } @@ -4481,11 +4579,11 @@ bool FieldDescriptorProto::MergePartialFromCodedStream( // optional string name = 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->mutable_name())); ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), this->name().length(), + this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormat::PARSE, "google.protobuf.FieldDescriptorProto.name"); } else { @@ -4497,11 +4595,11 @@ bool FieldDescriptorProto::MergePartialFromCodedStream( // optional string extendee = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(18u)) { + static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_extendee())); ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->extendee().data(), this->extendee().length(), + this->extendee().data(), static_cast(this->extendee().length()), ::google::protobuf::internal::WireFormat::PARSE, "google.protobuf.FieldDescriptorProto.extendee"); } else { @@ -4513,7 +4611,7 @@ bool FieldDescriptorProto::MergePartialFromCodedStream( // optional int32 number = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(24u)) { + static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) { set_has_number(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( @@ -4527,7 +4625,7 @@ bool FieldDescriptorProto::MergePartialFromCodedStream( // optional .google.protobuf.FieldDescriptorProto.Label label = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(32u)) { + static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) { int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( @@ -4535,7 +4633,8 @@ bool FieldDescriptorProto::MergePartialFromCodedStream( if (::google::protobuf::FieldDescriptorProto_Label_IsValid(value)) { set_label(static_cast< ::google::protobuf::FieldDescriptorProto_Label >(value)); } else { - mutable_unknown_fields()->AddVarint(4, value); + mutable_unknown_fields()->AddVarint( + 4, static_cast< ::google::protobuf::uint64>(value)); } } else { goto handle_unusual; @@ -4546,7 +4645,7 @@ bool FieldDescriptorProto::MergePartialFromCodedStream( // optional .google.protobuf.FieldDescriptorProto.Type type = 5; case 5: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(40u)) { + static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) { int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( @@ -4554,7 +4653,8 @@ bool FieldDescriptorProto::MergePartialFromCodedStream( if (::google::protobuf::FieldDescriptorProto_Type_IsValid(value)) { set_type(static_cast< ::google::protobuf::FieldDescriptorProto_Type >(value)); } else { - mutable_unknown_fields()->AddVarint(5, value); + mutable_unknown_fields()->AddVarint( + 5, static_cast< ::google::protobuf::uint64>(value)); } } else { goto handle_unusual; @@ -4565,11 +4665,11 @@ bool FieldDescriptorProto::MergePartialFromCodedStream( // optional string type_name = 6; case 6: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(50u)) { + static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_type_name())); ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->type_name().data(), this->type_name().length(), + this->type_name().data(), static_cast(this->type_name().length()), ::google::protobuf::internal::WireFormat::PARSE, "google.protobuf.FieldDescriptorProto.type_name"); } else { @@ -4581,11 +4681,11 @@ bool FieldDescriptorProto::MergePartialFromCodedStream( // optional string default_value = 7; case 7: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(58u)) { + static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_default_value())); ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->default_value().data(), this->default_value().length(), + this->default_value().data(), static_cast(this->default_value().length()), ::google::protobuf::internal::WireFormat::PARSE, "google.protobuf.FieldDescriptorProto.default_value"); } else { @@ -4597,7 +4697,7 @@ bool FieldDescriptorProto::MergePartialFromCodedStream( // optional .google.protobuf.FieldOptions options = 8; case 8: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(66u)) { + static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_options())); } else { @@ -4609,7 +4709,7 @@ bool FieldDescriptorProto::MergePartialFromCodedStream( // optional int32 oneof_index = 9; case 9: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(72u)) { + static_cast< ::google::protobuf::uint8>(72u /* 72 & 0xFF */)) { set_has_oneof_index(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( @@ -4623,11 +4723,11 @@ bool FieldDescriptorProto::MergePartialFromCodedStream( // optional string json_name = 10; case 10: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(82u)) { + static_cast< ::google::protobuf::uint8>(82u /* 82 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_json_name())); ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->json_name().data(), this->json_name().length(), + this->json_name().data(), static_cast(this->json_name().length()), ::google::protobuf::internal::WireFormat::PARSE, "google.protobuf.FieldDescriptorProto.json_name"); } else { @@ -4638,13 +4738,11 @@ bool FieldDescriptorProto::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::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -4668,7 +4766,7 @@ void FieldDescriptorProto::SerializeWithCachedSizes( // optional string name = 1; if (cached_has_bits & 0x00000001u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), this->name().length(), + this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.FieldDescriptorProto.name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( @@ -4678,7 +4776,7 @@ void FieldDescriptorProto::SerializeWithCachedSizes( // optional string extendee = 2; if (cached_has_bits & 0x00000002u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->extendee().data(), this->extendee().length(), + this->extendee().data(), static_cast(this->extendee().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.FieldDescriptorProto.extendee"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( @@ -4705,7 +4803,7 @@ void FieldDescriptorProto::SerializeWithCachedSizes( // optional string type_name = 6; if (cached_has_bits & 0x00000004u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->type_name().data(), this->type_name().length(), + this->type_name().data(), static_cast(this->type_name().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.FieldDescriptorProto.type_name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( @@ -4715,7 +4813,7 @@ void FieldDescriptorProto::SerializeWithCachedSizes( // optional string default_value = 7; if (cached_has_bits & 0x00000008u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->default_value().data(), this->default_value().length(), + this->default_value().data(), static_cast(this->default_value().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.FieldDescriptorProto.default_value"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( @@ -4736,7 +4834,7 @@ void FieldDescriptorProto::SerializeWithCachedSizes( // optional string json_name = 10; if (cached_has_bits & 0x00000010u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->json_name().data(), this->json_name().length(), + this->json_name().data(), static_cast(this->json_name().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.FieldDescriptorProto.json_name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( @@ -4745,7 +4843,7 @@ void FieldDescriptorProto::SerializeWithCachedSizes( if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); + _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.FieldDescriptorProto) } @@ -4761,7 +4859,7 @@ ::google::protobuf::uint8* FieldDescriptorProto::InternalSerializeWithCachedSize // optional string name = 1; if (cached_has_bits & 0x00000001u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), this->name().length(), + this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.FieldDescriptorProto.name"); target = @@ -4772,7 +4870,7 @@ ::google::protobuf::uint8* FieldDescriptorProto::InternalSerializeWithCachedSize // optional string extendee = 2; if (cached_has_bits & 0x00000002u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->extendee().data(), this->extendee().length(), + this->extendee().data(), static_cast(this->extendee().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.FieldDescriptorProto.extendee"); target = @@ -4800,7 +4898,7 @@ ::google::protobuf::uint8* FieldDescriptorProto::InternalSerializeWithCachedSize // optional string type_name = 6; if (cached_has_bits & 0x00000004u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->type_name().data(), this->type_name().length(), + this->type_name().data(), static_cast(this->type_name().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.FieldDescriptorProto.type_name"); target = @@ -4811,7 +4909,7 @@ ::google::protobuf::uint8* FieldDescriptorProto::InternalSerializeWithCachedSize // optional string default_value = 7; if (cached_has_bits & 0x00000008u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->default_value().data(), this->default_value().length(), + this->default_value().data(), static_cast(this->default_value().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.FieldDescriptorProto.default_value"); target = @@ -4834,7 +4932,7 @@ ::google::protobuf::uint8* FieldDescriptorProto::InternalSerializeWithCachedSize // optional string json_name = 10; if (cached_has_bits & 0x00000010u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->json_name().data(), this->json_name().length(), + this->json_name().data(), static_cast(this->json_name().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.FieldDescriptorProto.json_name"); target = @@ -4844,7 +4942,7 @@ ::google::protobuf::uint8* FieldDescriptorProto::InternalSerializeWithCachedSize if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); + _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FieldDescriptorProto) return target; @@ -4857,7 +4955,7 @@ size_t FieldDescriptorProto::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); + _internal_metadata_.unknown_fields()); } if (_has_bits_[0 / 32] & 255u) { // optional string name = 1; @@ -5030,19 +5128,20 @@ void FieldDescriptorProto::Swap(FieldDescriptorProto* other) { InternalSwap(other); } void FieldDescriptorProto::InternalSwap(FieldDescriptorProto* other) { + using std::swap; name_.Swap(&other->name_); extendee_.Swap(&other->extendee_); type_name_.Swap(&other->type_name_); default_value_.Swap(&other->default_value_); json_name_.Swap(&other->json_name_); - std::swap(options_, other->options_); - std::swap(number_, other->number_); - std::swap(oneof_index_, other->oneof_index_); - std::swap(label_, other->label_); - std::swap(type_, other->type_); - std::swap(_has_bits_[0], other->_has_bits_[0]); + swap(options_, other->options_); + swap(number_, other->number_); + swap(oneof_index_, other->oneof_index_); + swap(label_, other->label_); + swap(type_, other->type_); + swap(_has_bits_[0], other->_has_bits_[0]); _internal_metadata_.Swap(&other->_internal_metadata_); - std::swap(_cached_size_, other->_cached_size_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata FieldDescriptorProto::GetMetadata() const { @@ -5481,9 +5580,10 @@ void FieldDescriptorProto::clear_options() { clear_has_options(); } const ::google::protobuf::FieldOptions& FieldDescriptorProto::options() const { + const ::google::protobuf::FieldOptions* p = options_; // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.options) - return options_ != NULL ? *options_ - : *::google::protobuf::FieldOptions::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::google::protobuf::_FieldOptions_default_instance_); } ::google::protobuf::FieldOptions* FieldDescriptorProto::mutable_options() { set_has_options(); @@ -5559,9 +5659,7 @@ OneofDescriptorProto::~OneofDescriptorProto() { void OneofDescriptorProto::SharedDtor() { name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - if (this != internal_default_instance()) { - delete options_; - } + if (this != internal_default_instance()) delete options_; } void OneofDescriptorProto::SetCachedSize(int size) const { @@ -5589,12 +5687,17 @@ OneofDescriptorProto* OneofDescriptorProto::New(::google::protobuf::Arena* arena void OneofDescriptorProto::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.OneofDescriptorProto) - if (_has_bits_[0 / 32] & 3u) { - if (has_name()) { + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 3u) { + if (cached_has_bits & 0x00000001u) { GOOGLE_DCHECK(!name_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); (*name_.UnsafeRawStringPointer())->clear(); } - if (has_options()) { + if (cached_has_bits & 0x00000002u) { GOOGLE_DCHECK(options_ != NULL); options_->::google::protobuf::OneofOptions::Clear(); } @@ -5616,11 +5719,11 @@ bool OneofDescriptorProto::MergePartialFromCodedStream( // optional string name = 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->mutable_name())); ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), this->name().length(), + this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormat::PARSE, "google.protobuf.OneofDescriptorProto.name"); } else { @@ -5632,7 +5735,7 @@ bool OneofDescriptorProto::MergePartialFromCodedStream( // optional .google.protobuf.OneofOptions options = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(18u)) { + static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_options())); } else { @@ -5643,13 +5746,11 @@ bool OneofDescriptorProto::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::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -5673,7 +5774,7 @@ void OneofDescriptorProto::SerializeWithCachedSizes( // optional string name = 1; if (cached_has_bits & 0x00000001u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), this->name().length(), + this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.OneofDescriptorProto.name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( @@ -5688,7 +5789,7 @@ void OneofDescriptorProto::SerializeWithCachedSizes( if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); + _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.OneofDescriptorProto) } @@ -5704,7 +5805,7 @@ ::google::protobuf::uint8* OneofDescriptorProto::InternalSerializeWithCachedSize // optional string name = 1; if (cached_has_bits & 0x00000001u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), this->name().length(), + this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.OneofDescriptorProto.name"); target = @@ -5721,7 +5822,7 @@ ::google::protobuf::uint8* OneofDescriptorProto::InternalSerializeWithCachedSize if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); + _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.OneofDescriptorProto) return target; @@ -5734,7 +5835,7 @@ size_t OneofDescriptorProto::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); + _internal_metadata_.unknown_fields()); } if (_has_bits_[0 / 32] & 3u) { // optional string name = 1; @@ -5819,11 +5920,12 @@ void OneofDescriptorProto::Swap(OneofDescriptorProto* other) { InternalSwap(other); } void OneofDescriptorProto::InternalSwap(OneofDescriptorProto* other) { + using std::swap; name_.Swap(&other->name_); - std::swap(options_, other->options_); - std::swap(_has_bits_[0], other->_has_bits_[0]); + swap(options_, other->options_); + swap(_has_bits_[0], other->_has_bits_[0]); _internal_metadata_.Swap(&other->_internal_metadata_); - std::swap(_cached_size_, other->_cached_size_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata OneofDescriptorProto::GetMetadata() const { @@ -5912,9 +6014,10 @@ void OneofDescriptorProto::clear_options() { clear_has_options(); } const ::google::protobuf::OneofOptions& OneofDescriptorProto::options() const { + const ::google::protobuf::OneofOptions* p = options_; // @@protoc_insertion_point(field_get:google.protobuf.OneofDescriptorProto.options) - return options_ != NULL ? *options_ - : *::google::protobuf::OneofOptions::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::google::protobuf::_OneofOptions_default_instance_); } ::google::protobuf::OneofOptions* OneofDescriptorProto::mutable_options() { set_has_options(); @@ -5992,9 +6095,7 @@ EnumDescriptorProto::~EnumDescriptorProto() { void EnumDescriptorProto::SharedDtor() { name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - if (this != internal_default_instance()) { - delete options_; - } + if (this != internal_default_instance()) delete options_; } void EnumDescriptorProto::SetCachedSize(int size) const { @@ -6022,13 +6123,18 @@ EnumDescriptorProto* EnumDescriptorProto::New(::google::protobuf::Arena* arena) void EnumDescriptorProto::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.EnumDescriptorProto) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + value_.Clear(); - if (_has_bits_[0 / 32] & 3u) { - if (has_name()) { + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 3u) { + if (cached_has_bits & 0x00000001u) { GOOGLE_DCHECK(!name_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); (*name_.UnsafeRawStringPointer())->clear(); } - if (has_options()) { + if (cached_has_bits & 0x00000002u) { GOOGLE_DCHECK(options_ != NULL); options_->::google::protobuf::EnumOptions::Clear(); } @@ -6050,11 +6156,11 @@ bool EnumDescriptorProto::MergePartialFromCodedStream( // optional string name = 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->mutable_name())); ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), this->name().length(), + this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormat::PARSE, "google.protobuf.EnumDescriptorProto.name"); } else { @@ -6066,7 +6172,7 @@ bool EnumDescriptorProto::MergePartialFromCodedStream( // repeated .google.protobuf.EnumValueDescriptorProto value = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(18u)) { + static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, add_value())); } else { @@ -6078,7 +6184,7 @@ bool EnumDescriptorProto::MergePartialFromCodedStream( // optional .google.protobuf.EnumOptions options = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(26u)) { + static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_options())); } else { @@ -6089,13 +6195,11 @@ bool EnumDescriptorProto::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::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -6119,7 +6223,7 @@ void EnumDescriptorProto::SerializeWithCachedSizes( // optional string name = 1; if (cached_has_bits & 0x00000001u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), this->name().length(), + this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.EnumDescriptorProto.name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( @@ -6127,9 +6231,10 @@ void EnumDescriptorProto::SerializeWithCachedSizes( } // repeated .google.protobuf.EnumValueDescriptorProto value = 2; - for (unsigned int i = 0, n = this->value_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->value_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 2, this->value(i), output); + 2, this->value(static_cast(i)), output); } // optional .google.protobuf.EnumOptions options = 3; @@ -6140,7 +6245,7 @@ void EnumDescriptorProto::SerializeWithCachedSizes( if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); + _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.EnumDescriptorProto) } @@ -6156,7 +6261,7 @@ ::google::protobuf::uint8* EnumDescriptorProto::InternalSerializeWithCachedSizes // optional string name = 1; if (cached_has_bits & 0x00000001u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), this->name().length(), + this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.EnumDescriptorProto.name"); target = @@ -6165,10 +6270,11 @@ ::google::protobuf::uint8* EnumDescriptorProto::InternalSerializeWithCachedSizes } // repeated .google.protobuf.EnumValueDescriptorProto value = 2; - for (unsigned int i = 0, n = this->value_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->value_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageNoVirtualToArray( - 2, this->value(i), deterministic, target); + 2, this->value(static_cast(i)), deterministic, target); } // optional .google.protobuf.EnumOptions options = 3; @@ -6180,7 +6286,7 @@ ::google::protobuf::uint8* EnumDescriptorProto::InternalSerializeWithCachedSizes if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); + _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumDescriptorProto) return target; @@ -6193,16 +6299,16 @@ size_t EnumDescriptorProto::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); + _internal_metadata_.unknown_fields()); } // repeated .google.protobuf.EnumValueDescriptorProto value = 2; { - unsigned int count = this->value_size(); + unsigned int count = static_cast(this->value_size()); total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->value(i)); + this->value(static_cast(i))); } } @@ -6291,12 +6397,13 @@ void EnumDescriptorProto::Swap(EnumDescriptorProto* other) { InternalSwap(other); } void EnumDescriptorProto::InternalSwap(EnumDescriptorProto* other) { + using std::swap; value_.InternalSwap(&other->value_); name_.Swap(&other->name_); - std::swap(options_, other->options_); - std::swap(_has_bits_[0], other->_has_bits_[0]); + swap(options_, other->options_); + swap(_has_bits_[0], other->_has_bits_[0]); _internal_metadata_.Swap(&other->_internal_metadata_); - std::swap(_cached_size_, other->_cached_size_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata EnumDescriptorProto::GetMetadata() const { @@ -6415,9 +6522,10 @@ void EnumDescriptorProto::clear_options() { clear_has_options(); } const ::google::protobuf::EnumOptions& EnumDescriptorProto::options() const { + const ::google::protobuf::EnumOptions* p = options_; // @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.options) - return options_ != NULL ? *options_ - : *::google::protobuf::EnumOptions::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::google::protobuf::_EnumOptions_default_instance_); } ::google::protobuf::EnumOptions* EnumDescriptorProto::mutable_options() { set_has_options(); @@ -6485,8 +6593,9 @@ EnumValueDescriptorProto::EnumValueDescriptorProto(const EnumValueDescriptorProt void EnumValueDescriptorProto::SharedCtor() { _cached_size_ = 0; name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - ::memset(&options_, 0, reinterpret_cast(&number_) - - reinterpret_cast(&options_) + sizeof(number_)); + ::memset(&options_, 0, static_cast( + reinterpret_cast(&number_) - + reinterpret_cast(&options_)) + sizeof(number_)); } EnumValueDescriptorProto::~EnumValueDescriptorProto() { @@ -6496,9 +6605,7 @@ EnumValueDescriptorProto::~EnumValueDescriptorProto() { void EnumValueDescriptorProto::SharedDtor() { name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - if (this != internal_default_instance()) { - delete options_; - } + if (this != internal_default_instance()) delete options_; } void EnumValueDescriptorProto::SetCachedSize(int size) const { @@ -6526,12 +6633,17 @@ EnumValueDescriptorProto* EnumValueDescriptorProto::New(::google::protobuf::Aren void EnumValueDescriptorProto::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.EnumValueDescriptorProto) - if (_has_bits_[0 / 32] & 3u) { - if (has_name()) { + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 3u) { + if (cached_has_bits & 0x00000001u) { GOOGLE_DCHECK(!name_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); (*name_.UnsafeRawStringPointer())->clear(); } - if (has_options()) { + if (cached_has_bits & 0x00000002u) { GOOGLE_DCHECK(options_ != NULL); options_->::google::protobuf::EnumValueOptions::Clear(); } @@ -6554,11 +6666,11 @@ bool EnumValueDescriptorProto::MergePartialFromCodedStream( // optional string name = 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->mutable_name())); ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), this->name().length(), + this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormat::PARSE, "google.protobuf.EnumValueDescriptorProto.name"); } else { @@ -6570,7 +6682,7 @@ bool EnumValueDescriptorProto::MergePartialFromCodedStream( // optional int32 number = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(16u)) { + static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { set_has_number(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( @@ -6584,7 +6696,7 @@ bool EnumValueDescriptorProto::MergePartialFromCodedStream( // optional .google.protobuf.EnumValueOptions options = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(26u)) { + static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_options())); } else { @@ -6595,13 +6707,11 @@ bool EnumValueDescriptorProto::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::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -6625,7 +6735,7 @@ void EnumValueDescriptorProto::SerializeWithCachedSizes( // optional string name = 1; if (cached_has_bits & 0x00000001u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), this->name().length(), + this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.EnumValueDescriptorProto.name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( @@ -6645,7 +6755,7 @@ void EnumValueDescriptorProto::SerializeWithCachedSizes( if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); + _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.EnumValueDescriptorProto) } @@ -6661,7 +6771,7 @@ ::google::protobuf::uint8* EnumValueDescriptorProto::InternalSerializeWithCached // optional string name = 1; if (cached_has_bits & 0x00000001u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), this->name().length(), + this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.EnumValueDescriptorProto.name"); target = @@ -6683,7 +6793,7 @@ ::google::protobuf::uint8* EnumValueDescriptorProto::InternalSerializeWithCached if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); + _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumValueDescriptorProto) return target; @@ -6696,7 +6806,7 @@ size_t EnumValueDescriptorProto::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); + _internal_metadata_.unknown_fields()); } if (_has_bits_[0 / 32] & 7u) { // optional string name = 1; @@ -6792,12 +6902,13 @@ void EnumValueDescriptorProto::Swap(EnumValueDescriptorProto* other) { InternalSwap(other); } void EnumValueDescriptorProto::InternalSwap(EnumValueDescriptorProto* other) { + using std::swap; name_.Swap(&other->name_); - std::swap(options_, other->options_); - std::swap(number_, other->number_); - std::swap(_has_bits_[0], other->_has_bits_[0]); + swap(options_, other->options_); + swap(number_, other->number_); + swap(_has_bits_[0], other->_has_bits_[0]); _internal_metadata_.Swap(&other->_internal_metadata_); - std::swap(_cached_size_, other->_cached_size_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata EnumValueDescriptorProto::GetMetadata() const { @@ -6910,9 +7021,10 @@ void EnumValueDescriptorProto::clear_options() { clear_has_options(); } const ::google::protobuf::EnumValueOptions& EnumValueDescriptorProto::options() const { + const ::google::protobuf::EnumValueOptions* p = options_; // @@protoc_insertion_point(field_get:google.protobuf.EnumValueDescriptorProto.options) - return options_ != NULL ? *options_ - : *::google::protobuf::EnumValueOptions::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::google::protobuf::_EnumValueOptions_default_instance_); } ::google::protobuf::EnumValueOptions* EnumValueDescriptorProto::mutable_options() { set_has_options(); @@ -6990,9 +7102,7 @@ ServiceDescriptorProto::~ServiceDescriptorProto() { void ServiceDescriptorProto::SharedDtor() { name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - if (this != internal_default_instance()) { - delete options_; - } + if (this != internal_default_instance()) delete options_; } void ServiceDescriptorProto::SetCachedSize(int size) const { @@ -7020,13 +7130,18 @@ ServiceDescriptorProto* ServiceDescriptorProto::New(::google::protobuf::Arena* a void ServiceDescriptorProto::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.ServiceDescriptorProto) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + method_.Clear(); - if (_has_bits_[0 / 32] & 3u) { - if (has_name()) { + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 3u) { + if (cached_has_bits & 0x00000001u) { GOOGLE_DCHECK(!name_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); (*name_.UnsafeRawStringPointer())->clear(); } - if (has_options()) { + if (cached_has_bits & 0x00000002u) { GOOGLE_DCHECK(options_ != NULL); options_->::google::protobuf::ServiceOptions::Clear(); } @@ -7048,11 +7163,11 @@ bool ServiceDescriptorProto::MergePartialFromCodedStream( // optional string name = 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->mutable_name())); ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), this->name().length(), + this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormat::PARSE, "google.protobuf.ServiceDescriptorProto.name"); } else { @@ -7064,7 +7179,7 @@ bool ServiceDescriptorProto::MergePartialFromCodedStream( // repeated .google.protobuf.MethodDescriptorProto method = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(18u)) { + static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, add_method())); } else { @@ -7076,7 +7191,7 @@ bool ServiceDescriptorProto::MergePartialFromCodedStream( // optional .google.protobuf.ServiceOptions options = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(26u)) { + static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_options())); } else { @@ -7087,13 +7202,11 @@ bool ServiceDescriptorProto::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::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -7117,7 +7230,7 @@ void ServiceDescriptorProto::SerializeWithCachedSizes( // optional string name = 1; if (cached_has_bits & 0x00000001u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), this->name().length(), + this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.ServiceDescriptorProto.name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( @@ -7125,9 +7238,10 @@ void ServiceDescriptorProto::SerializeWithCachedSizes( } // repeated .google.protobuf.MethodDescriptorProto method = 2; - for (unsigned int i = 0, n = this->method_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->method_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 2, this->method(i), output); + 2, this->method(static_cast(i)), output); } // optional .google.protobuf.ServiceOptions options = 3; @@ -7138,7 +7252,7 @@ void ServiceDescriptorProto::SerializeWithCachedSizes( if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); + _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.ServiceDescriptorProto) } @@ -7154,7 +7268,7 @@ ::google::protobuf::uint8* ServiceDescriptorProto::InternalSerializeWithCachedSi // optional string name = 1; if (cached_has_bits & 0x00000001u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), this->name().length(), + this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.ServiceDescriptorProto.name"); target = @@ -7163,10 +7277,11 @@ ::google::protobuf::uint8* ServiceDescriptorProto::InternalSerializeWithCachedSi } // repeated .google.protobuf.MethodDescriptorProto method = 2; - for (unsigned int i = 0, n = this->method_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->method_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageNoVirtualToArray( - 2, this->method(i), deterministic, target); + 2, this->method(static_cast(i)), deterministic, target); } // optional .google.protobuf.ServiceOptions options = 3; @@ -7178,7 +7293,7 @@ ::google::protobuf::uint8* ServiceDescriptorProto::InternalSerializeWithCachedSi if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); + _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.ServiceDescriptorProto) return target; @@ -7191,16 +7306,16 @@ size_t ServiceDescriptorProto::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); + _internal_metadata_.unknown_fields()); } // repeated .google.protobuf.MethodDescriptorProto method = 2; { - unsigned int count = this->method_size(); + unsigned int count = static_cast(this->method_size()); total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->method(i)); + this->method(static_cast(i))); } } @@ -7289,12 +7404,13 @@ void ServiceDescriptorProto::Swap(ServiceDescriptorProto* other) { InternalSwap(other); } void ServiceDescriptorProto::InternalSwap(ServiceDescriptorProto* other) { + using std::swap; method_.InternalSwap(&other->method_); name_.Swap(&other->name_); - std::swap(options_, other->options_); - std::swap(_has_bits_[0], other->_has_bits_[0]); + swap(options_, other->options_); + swap(_has_bits_[0], other->_has_bits_[0]); _internal_metadata_.Swap(&other->_internal_metadata_); - std::swap(_cached_size_, other->_cached_size_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata ServiceDescriptorProto::GetMetadata() const { @@ -7413,9 +7529,10 @@ void ServiceDescriptorProto::clear_options() { clear_has_options(); } const ::google::protobuf::ServiceOptions& ServiceDescriptorProto::options() const { + const ::google::protobuf::ServiceOptions* p = options_; // @@protoc_insertion_point(field_get:google.protobuf.ServiceDescriptorProto.options) - return options_ != NULL ? *options_ - : *::google::protobuf::ServiceOptions::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::google::protobuf::_ServiceOptions_default_instance_); } ::google::protobuf::ServiceOptions* ServiceDescriptorProto::mutable_options() { set_has_options(); @@ -7488,8 +7605,8 @@ MethodDescriptorProto::MethodDescriptorProto(const MethodDescriptorProto& from) options_ = NULL; } ::memcpy(&client_streaming_, &from.client_streaming_, - reinterpret_cast(&server_streaming_) - - reinterpret_cast(&client_streaming_) + sizeof(server_streaming_)); + static_cast(reinterpret_cast(&server_streaming_) - + reinterpret_cast(&client_streaming_)) + sizeof(server_streaming_)); // @@protoc_insertion_point(copy_constructor:google.protobuf.MethodDescriptorProto) } @@ -7498,8 +7615,9 @@ void MethodDescriptorProto::SharedCtor() { name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); input_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); output_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - ::memset(&options_, 0, reinterpret_cast(&server_streaming_) - - reinterpret_cast(&options_) + sizeof(server_streaming_)); + ::memset(&options_, 0, static_cast( + reinterpret_cast(&server_streaming_) - + reinterpret_cast(&options_)) + sizeof(server_streaming_)); } MethodDescriptorProto::~MethodDescriptorProto() { @@ -7511,9 +7629,7 @@ void MethodDescriptorProto::SharedDtor() { name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); input_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); output_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - if (this != internal_default_instance()) { - delete options_; - } + if (this != internal_default_instance()) delete options_; } void MethodDescriptorProto::SetCachedSize(int size) const { @@ -7541,27 +7657,33 @@ MethodDescriptorProto* MethodDescriptorProto::New(::google::protobuf::Arena* are void MethodDescriptorProto::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.MethodDescriptorProto) - if (_has_bits_[0 / 32] & 15u) { - if (has_name()) { + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 15u) { + if (cached_has_bits & 0x00000001u) { GOOGLE_DCHECK(!name_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); (*name_.UnsafeRawStringPointer())->clear(); } - if (has_input_type()) { + if (cached_has_bits & 0x00000002u) { GOOGLE_DCHECK(!input_type_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); (*input_type_.UnsafeRawStringPointer())->clear(); } - if (has_output_type()) { + if (cached_has_bits & 0x00000004u) { GOOGLE_DCHECK(!output_type_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); (*output_type_.UnsafeRawStringPointer())->clear(); } - if (has_options()) { + if (cached_has_bits & 0x00000008u) { GOOGLE_DCHECK(options_ != NULL); options_->::google::protobuf::MethodOptions::Clear(); } } - if (_has_bits_[0 / 32] & 48u) { - ::memset(&client_streaming_, 0, reinterpret_cast(&server_streaming_) - - reinterpret_cast(&client_streaming_) + sizeof(server_streaming_)); + if (cached_has_bits & 48u) { + ::memset(&client_streaming_, 0, static_cast( + reinterpret_cast(&server_streaming_) - + reinterpret_cast(&client_streaming_)) + sizeof(server_streaming_)); } _has_bits_.Clear(); _internal_metadata_.Clear(); @@ -7580,11 +7702,11 @@ bool MethodDescriptorProto::MergePartialFromCodedStream( // optional string name = 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->mutable_name())); ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), this->name().length(), + this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormat::PARSE, "google.protobuf.MethodDescriptorProto.name"); } else { @@ -7596,11 +7718,11 @@ bool MethodDescriptorProto::MergePartialFromCodedStream( // optional string input_type = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(18u)) { + static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_input_type())); ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->input_type().data(), this->input_type().length(), + this->input_type().data(), static_cast(this->input_type().length()), ::google::protobuf::internal::WireFormat::PARSE, "google.protobuf.MethodDescriptorProto.input_type"); } else { @@ -7612,11 +7734,11 @@ bool MethodDescriptorProto::MergePartialFromCodedStream( // optional string output_type = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(26u)) { + static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_output_type())); ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->output_type().data(), this->output_type().length(), + this->output_type().data(), static_cast(this->output_type().length()), ::google::protobuf::internal::WireFormat::PARSE, "google.protobuf.MethodDescriptorProto.output_type"); } else { @@ -7628,7 +7750,7 @@ bool MethodDescriptorProto::MergePartialFromCodedStream( // optional .google.protobuf.MethodOptions options = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(34u)) { + static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_options())); } else { @@ -7640,7 +7762,7 @@ bool MethodDescriptorProto::MergePartialFromCodedStream( // optional bool client_streaming = 5 [default = false]; case 5: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(40u)) { + static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) { set_has_client_streaming(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -7654,7 +7776,7 @@ bool MethodDescriptorProto::MergePartialFromCodedStream( // optional bool server_streaming = 6 [default = false]; case 6: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(48u)) { + static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) { set_has_server_streaming(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -7667,13 +7789,11 @@ bool MethodDescriptorProto::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::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -7697,7 +7817,7 @@ void MethodDescriptorProto::SerializeWithCachedSizes( // optional string name = 1; if (cached_has_bits & 0x00000001u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), this->name().length(), + this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.MethodDescriptorProto.name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( @@ -7707,7 +7827,7 @@ void MethodDescriptorProto::SerializeWithCachedSizes( // optional string input_type = 2; if (cached_has_bits & 0x00000002u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->input_type().data(), this->input_type().length(), + this->input_type().data(), static_cast(this->input_type().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.MethodDescriptorProto.input_type"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( @@ -7717,7 +7837,7 @@ void MethodDescriptorProto::SerializeWithCachedSizes( // optional string output_type = 3; if (cached_has_bits & 0x00000004u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->output_type().data(), this->output_type().length(), + this->output_type().data(), static_cast(this->output_type().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.MethodDescriptorProto.output_type"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( @@ -7742,7 +7862,7 @@ void MethodDescriptorProto::SerializeWithCachedSizes( if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); + _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.MethodDescriptorProto) } @@ -7758,7 +7878,7 @@ ::google::protobuf::uint8* MethodDescriptorProto::InternalSerializeWithCachedSiz // optional string name = 1; if (cached_has_bits & 0x00000001u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), this->name().length(), + this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.MethodDescriptorProto.name"); target = @@ -7769,7 +7889,7 @@ ::google::protobuf::uint8* MethodDescriptorProto::InternalSerializeWithCachedSiz // optional string input_type = 2; if (cached_has_bits & 0x00000002u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->input_type().data(), this->input_type().length(), + this->input_type().data(), static_cast(this->input_type().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.MethodDescriptorProto.input_type"); target = @@ -7780,7 +7900,7 @@ ::google::protobuf::uint8* MethodDescriptorProto::InternalSerializeWithCachedSiz // optional string output_type = 3; if (cached_has_bits & 0x00000004u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->output_type().data(), this->output_type().length(), + this->output_type().data(), static_cast(this->output_type().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.MethodDescriptorProto.output_type"); target = @@ -7807,7 +7927,7 @@ ::google::protobuf::uint8* MethodDescriptorProto::InternalSerializeWithCachedSiz if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); + _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.MethodDescriptorProto) return target; @@ -7820,7 +7940,7 @@ size_t MethodDescriptorProto::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); + _internal_metadata_.unknown_fields()); } if (_has_bits_[0 / 32] & 63u) { // optional string name = 1; @@ -7944,15 +8064,16 @@ void MethodDescriptorProto::Swap(MethodDescriptorProto* other) { InternalSwap(other); } void MethodDescriptorProto::InternalSwap(MethodDescriptorProto* other) { + using std::swap; name_.Swap(&other->name_); input_type_.Swap(&other->input_type_); output_type_.Swap(&other->output_type_); - std::swap(options_, other->options_); - std::swap(client_streaming_, other->client_streaming_); - std::swap(server_streaming_, other->server_streaming_); - std::swap(_has_bits_[0], other->_has_bits_[0]); + swap(options_, other->options_); + swap(client_streaming_, other->client_streaming_); + swap(server_streaming_, other->server_streaming_); + swap(_has_bits_[0], other->_has_bits_[0]); _internal_metadata_.Swap(&other->_internal_metadata_); - std::swap(_cached_size_, other->_cached_size_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata MethodDescriptorProto::GetMetadata() const { @@ -8167,9 +8288,10 @@ void MethodDescriptorProto::clear_options() { clear_has_options(); } const ::google::protobuf::MethodOptions& MethodDescriptorProto::options() const { + const ::google::protobuf::MethodOptions* p = options_; // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.options) - return options_ != NULL ? *options_ - : *::google::protobuf::MethodOptions::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::google::protobuf::_MethodOptions_default_instance_); } ::google::protobuf::MethodOptions* MethodDescriptorProto::mutable_options() { set_has_options(); @@ -8314,8 +8436,8 @@ FileOptions::FileOptions(const FileOptions& from) php_class_prefix_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.php_class_prefix_); } ::memcpy(&java_multiple_files_, &from.java_multiple_files_, - reinterpret_cast(&optimize_for_) - - reinterpret_cast(&java_multiple_files_) + sizeof(optimize_for_)); + static_cast(reinterpret_cast(&optimize_for_) - + reinterpret_cast(&java_multiple_files_)) + sizeof(optimize_for_)); // @@protoc_insertion_point(copy_constructor:google.protobuf.FileOptions) } @@ -8328,8 +8450,9 @@ void FileOptions::SharedCtor() { csharp_namespace_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); swift_prefix_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); php_class_prefix_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - ::memset(&java_multiple_files_, 0, reinterpret_cast(&cc_enable_arenas_) - - reinterpret_cast(&java_multiple_files_) + sizeof(cc_enable_arenas_)); + ::memset(&java_multiple_files_, 0, static_cast( + reinterpret_cast(&cc_enable_arenas_) - + reinterpret_cast(&java_multiple_files_)) + sizeof(cc_enable_arenas_)); optimize_for_ = 1; } @@ -8373,42 +8496,48 @@ FileOptions* FileOptions::New(::google::protobuf::Arena* arena) const { void FileOptions::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.FileOptions) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + _extensions_.Clear(); uninterpreted_option_.Clear(); - if (_has_bits_[0 / 32] & 127u) { - if (has_java_package()) { + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 127u) { + if (cached_has_bits & 0x00000001u) { GOOGLE_DCHECK(!java_package_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); (*java_package_.UnsafeRawStringPointer())->clear(); } - if (has_java_outer_classname()) { + if (cached_has_bits & 0x00000002u) { GOOGLE_DCHECK(!java_outer_classname_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); (*java_outer_classname_.UnsafeRawStringPointer())->clear(); } - if (has_go_package()) { + if (cached_has_bits & 0x00000004u) { GOOGLE_DCHECK(!go_package_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); (*go_package_.UnsafeRawStringPointer())->clear(); } - if (has_objc_class_prefix()) { + if (cached_has_bits & 0x00000008u) { GOOGLE_DCHECK(!objc_class_prefix_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); (*objc_class_prefix_.UnsafeRawStringPointer())->clear(); } - if (has_csharp_namespace()) { + if (cached_has_bits & 0x00000010u) { GOOGLE_DCHECK(!csharp_namespace_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); (*csharp_namespace_.UnsafeRawStringPointer())->clear(); } - if (has_swift_prefix()) { + if (cached_has_bits & 0x00000020u) { GOOGLE_DCHECK(!swift_prefix_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); (*swift_prefix_.UnsafeRawStringPointer())->clear(); } - if (has_php_class_prefix()) { + if (cached_has_bits & 0x00000040u) { GOOGLE_DCHECK(!php_class_prefix_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); (*php_class_prefix_.UnsafeRawStringPointer())->clear(); } } java_multiple_files_ = false; - if (_has_bits_[8 / 32] & 65280u) { - ::memset(&java_generate_equals_and_hash_, 0, reinterpret_cast(&cc_enable_arenas_) - - reinterpret_cast(&java_generate_equals_and_hash_) + sizeof(cc_enable_arenas_)); + if (cached_has_bits & 65280u) { + ::memset(&java_generate_equals_and_hash_, 0, static_cast( + reinterpret_cast(&cc_enable_arenas_) - + reinterpret_cast(&java_generate_equals_and_hash_)) + sizeof(cc_enable_arenas_)); optimize_for_ = 1; } _has_bits_.Clear(); @@ -8428,11 +8557,11 @@ bool FileOptions::MergePartialFromCodedStream( // optional string java_package = 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->mutable_java_package())); ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->java_package().data(), this->java_package().length(), + this->java_package().data(), static_cast(this->java_package().length()), ::google::protobuf::internal::WireFormat::PARSE, "google.protobuf.FileOptions.java_package"); } else { @@ -8444,11 +8573,11 @@ bool FileOptions::MergePartialFromCodedStream( // optional string java_outer_classname = 8; case 8: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(66u)) { + static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_java_outer_classname())); ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->java_outer_classname().data(), this->java_outer_classname().length(), + this->java_outer_classname().data(), static_cast(this->java_outer_classname().length()), ::google::protobuf::internal::WireFormat::PARSE, "google.protobuf.FileOptions.java_outer_classname"); } else { @@ -8460,7 +8589,7 @@ bool FileOptions::MergePartialFromCodedStream( // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED]; case 9: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(72u)) { + static_cast< ::google::protobuf::uint8>(72u /* 72 & 0xFF */)) { int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( @@ -8468,7 +8597,8 @@ bool FileOptions::MergePartialFromCodedStream( if (::google::protobuf::FileOptions_OptimizeMode_IsValid(value)) { set_optimize_for(static_cast< ::google::protobuf::FileOptions_OptimizeMode >(value)); } else { - mutable_unknown_fields()->AddVarint(9, value); + mutable_unknown_fields()->AddVarint( + 9, static_cast< ::google::protobuf::uint64>(value)); } } else { goto handle_unusual; @@ -8479,7 +8609,7 @@ bool FileOptions::MergePartialFromCodedStream( // optional bool java_multiple_files = 10 [default = false]; case 10: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(80u)) { + static_cast< ::google::protobuf::uint8>(80u /* 80 & 0xFF */)) { set_has_java_multiple_files(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -8493,11 +8623,11 @@ bool FileOptions::MergePartialFromCodedStream( // optional string go_package = 11; case 11: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(90u)) { + static_cast< ::google::protobuf::uint8>(90u /* 90 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_go_package())); ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->go_package().data(), this->go_package().length(), + this->go_package().data(), static_cast(this->go_package().length()), ::google::protobuf::internal::WireFormat::PARSE, "google.protobuf.FileOptions.go_package"); } else { @@ -8509,7 +8639,7 @@ bool FileOptions::MergePartialFromCodedStream( // optional bool cc_generic_services = 16 [default = false]; case 16: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(128u)) { + static_cast< ::google::protobuf::uint8>(128u /* 128 & 0xFF */)) { set_has_cc_generic_services(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -8523,7 +8653,7 @@ bool FileOptions::MergePartialFromCodedStream( // optional bool java_generic_services = 17 [default = false]; case 17: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(136u)) { + static_cast< ::google::protobuf::uint8>(136u /* 136 & 0xFF */)) { set_has_java_generic_services(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -8537,7 +8667,7 @@ bool FileOptions::MergePartialFromCodedStream( // optional bool py_generic_services = 18 [default = false]; case 18: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(144u)) { + static_cast< ::google::protobuf::uint8>(144u /* 144 & 0xFF */)) { set_has_py_generic_services(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -8551,7 +8681,7 @@ bool FileOptions::MergePartialFromCodedStream( // optional bool java_generate_equals_and_hash = 20 [deprecated = true]; case 20: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(160u)) { + static_cast< ::google::protobuf::uint8>(160u /* 160 & 0xFF */)) { set_has_java_generate_equals_and_hash(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -8565,7 +8695,7 @@ bool FileOptions::MergePartialFromCodedStream( // optional bool deprecated = 23 [default = false]; case 23: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(184u)) { + static_cast< ::google::protobuf::uint8>(184u /* 184 & 0xFF */)) { set_has_deprecated(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -8579,7 +8709,7 @@ bool FileOptions::MergePartialFromCodedStream( // optional bool java_string_check_utf8 = 27 [default = false]; case 27: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(216u)) { + static_cast< ::google::protobuf::uint8>(216u /* 216 & 0xFF */)) { set_has_java_string_check_utf8(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -8593,7 +8723,7 @@ bool FileOptions::MergePartialFromCodedStream( // optional bool cc_enable_arenas = 31 [default = false]; case 31: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(248u)) { + static_cast< ::google::protobuf::uint8>(248u /* 248 & 0xFF */)) { set_has_cc_enable_arenas(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -8607,11 +8737,11 @@ bool FileOptions::MergePartialFromCodedStream( // optional string objc_class_prefix = 36; case 36: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(290u)) { + static_cast< ::google::protobuf::uint8>(34u /* 290 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_objc_class_prefix())); ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->objc_class_prefix().data(), this->objc_class_prefix().length(), + this->objc_class_prefix().data(), static_cast(this->objc_class_prefix().length()), ::google::protobuf::internal::WireFormat::PARSE, "google.protobuf.FileOptions.objc_class_prefix"); } else { @@ -8623,11 +8753,11 @@ bool FileOptions::MergePartialFromCodedStream( // optional string csharp_namespace = 37; case 37: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(298u)) { + static_cast< ::google::protobuf::uint8>(42u /* 298 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_csharp_namespace())); ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->csharp_namespace().data(), this->csharp_namespace().length(), + this->csharp_namespace().data(), static_cast(this->csharp_namespace().length()), ::google::protobuf::internal::WireFormat::PARSE, "google.protobuf.FileOptions.csharp_namespace"); } else { @@ -8639,11 +8769,11 @@ bool FileOptions::MergePartialFromCodedStream( // optional string swift_prefix = 39; case 39: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(314u)) { + static_cast< ::google::protobuf::uint8>(58u /* 314 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_swift_prefix())); ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->swift_prefix().data(), this->swift_prefix().length(), + this->swift_prefix().data(), static_cast(this->swift_prefix().length()), ::google::protobuf::internal::WireFormat::PARSE, "google.protobuf.FileOptions.swift_prefix"); } else { @@ -8655,11 +8785,11 @@ bool FileOptions::MergePartialFromCodedStream( // optional string php_class_prefix = 40; case 40: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(322u)) { + static_cast< ::google::protobuf::uint8>(66u /* 322 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_php_class_prefix())); ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->php_class_prefix().data(), this->php_class_prefix().length(), + this->php_class_prefix().data(), static_cast(this->php_class_prefix().length()), ::google::protobuf::internal::WireFormat::PARSE, "google.protobuf.FileOptions.php_class_prefix"); } else { @@ -8671,7 +8801,7 @@ bool FileOptions::MergePartialFromCodedStream( // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; case 999: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(7994u)) { + static_cast< ::google::protobuf::uint8>(58u /* 7994 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, add_uninterpreted_option())); } else { @@ -8682,18 +8812,17 @@ bool FileOptions::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; } if ((8000u <= tag)) { - DO_(_extensions_.ParseField(tag, input, internal_default_instance(), - mutable_unknown_fields())); + DO_(_extensions_.ParseField(tag, input, + internal_default_instance(), + _internal_metadata_.mutable_unknown_fields())); continue; } DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -8717,7 +8846,7 @@ void FileOptions::SerializeWithCachedSizes( // optional string java_package = 1; if (cached_has_bits & 0x00000001u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->java_package().data(), this->java_package().length(), + this->java_package().data(), static_cast(this->java_package().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.FileOptions.java_package"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( @@ -8727,7 +8856,7 @@ void FileOptions::SerializeWithCachedSizes( // optional string java_outer_classname = 8; if (cached_has_bits & 0x00000002u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->java_outer_classname().data(), this->java_outer_classname().length(), + this->java_outer_classname().data(), static_cast(this->java_outer_classname().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.FileOptions.java_outer_classname"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( @@ -8748,7 +8877,7 @@ void FileOptions::SerializeWithCachedSizes( // optional string go_package = 11; if (cached_has_bits & 0x00000004u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->go_package().data(), this->go_package().length(), + this->go_package().data(), static_cast(this->go_package().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.FileOptions.go_package"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( @@ -8793,7 +8922,7 @@ void FileOptions::SerializeWithCachedSizes( // optional string objc_class_prefix = 36; if (cached_has_bits & 0x00000008u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->objc_class_prefix().data(), this->objc_class_prefix().length(), + this->objc_class_prefix().data(), static_cast(this->objc_class_prefix().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.FileOptions.objc_class_prefix"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( @@ -8803,7 +8932,7 @@ void FileOptions::SerializeWithCachedSizes( // optional string csharp_namespace = 37; if (cached_has_bits & 0x00000010u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->csharp_namespace().data(), this->csharp_namespace().length(), + this->csharp_namespace().data(), static_cast(this->csharp_namespace().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.FileOptions.csharp_namespace"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( @@ -8813,7 +8942,7 @@ void FileOptions::SerializeWithCachedSizes( // optional string swift_prefix = 39; if (cached_has_bits & 0x00000020u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->swift_prefix().data(), this->swift_prefix().length(), + this->swift_prefix().data(), static_cast(this->swift_prefix().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.FileOptions.swift_prefix"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( @@ -8823,7 +8952,7 @@ void FileOptions::SerializeWithCachedSizes( // optional string php_class_prefix = 40; if (cached_has_bits & 0x00000040u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->php_class_prefix().data(), this->php_class_prefix().length(), + this->php_class_prefix().data(), static_cast(this->php_class_prefix().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.FileOptions.php_class_prefix"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( @@ -8831,9 +8960,10 @@ void FileOptions::SerializeWithCachedSizes( } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->uninterpreted_option_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 999, this->uninterpreted_option(i), output); + 999, this->uninterpreted_option(static_cast(i)), output); } // Extension range [1000, 536870912) @@ -8842,7 +8972,7 @@ void FileOptions::SerializeWithCachedSizes( if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); + _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.FileOptions) } @@ -8858,7 +8988,7 @@ ::google::protobuf::uint8* FileOptions::InternalSerializeWithCachedSizesToArray( // optional string java_package = 1; if (cached_has_bits & 0x00000001u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->java_package().data(), this->java_package().length(), + this->java_package().data(), static_cast(this->java_package().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.FileOptions.java_package"); target = @@ -8869,7 +8999,7 @@ ::google::protobuf::uint8* FileOptions::InternalSerializeWithCachedSizesToArray( // optional string java_outer_classname = 8; if (cached_has_bits & 0x00000002u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->java_outer_classname().data(), this->java_outer_classname().length(), + this->java_outer_classname().data(), static_cast(this->java_outer_classname().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.FileOptions.java_outer_classname"); target = @@ -8891,7 +9021,7 @@ ::google::protobuf::uint8* FileOptions::InternalSerializeWithCachedSizesToArray( // optional string go_package = 11; if (cached_has_bits & 0x00000004u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->go_package().data(), this->go_package().length(), + this->go_package().data(), static_cast(this->go_package().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.FileOptions.go_package"); target = @@ -8937,7 +9067,7 @@ ::google::protobuf::uint8* FileOptions::InternalSerializeWithCachedSizesToArray( // optional string objc_class_prefix = 36; if (cached_has_bits & 0x00000008u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->objc_class_prefix().data(), this->objc_class_prefix().length(), + this->objc_class_prefix().data(), static_cast(this->objc_class_prefix().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.FileOptions.objc_class_prefix"); target = @@ -8948,7 +9078,7 @@ ::google::protobuf::uint8* FileOptions::InternalSerializeWithCachedSizesToArray( // optional string csharp_namespace = 37; if (cached_has_bits & 0x00000010u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->csharp_namespace().data(), this->csharp_namespace().length(), + this->csharp_namespace().data(), static_cast(this->csharp_namespace().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.FileOptions.csharp_namespace"); target = @@ -8959,7 +9089,7 @@ ::google::protobuf::uint8* FileOptions::InternalSerializeWithCachedSizesToArray( // optional string swift_prefix = 39; if (cached_has_bits & 0x00000020u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->swift_prefix().data(), this->swift_prefix().length(), + this->swift_prefix().data(), static_cast(this->swift_prefix().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.FileOptions.swift_prefix"); target = @@ -8970,7 +9100,7 @@ ::google::protobuf::uint8* FileOptions::InternalSerializeWithCachedSizesToArray( // optional string php_class_prefix = 40; if (cached_has_bits & 0x00000040u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->php_class_prefix().data(), this->php_class_prefix().length(), + this->php_class_prefix().data(), static_cast(this->php_class_prefix().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.FileOptions.php_class_prefix"); target = @@ -8979,10 +9109,11 @@ ::google::protobuf::uint8* FileOptions::InternalSerializeWithCachedSizesToArray( } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->uninterpreted_option_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageNoVirtualToArray( - 999, this->uninterpreted_option(i), deterministic, target); + 999, this->uninterpreted_option(static_cast(i)), deterministic, target); } // Extension range [1000, 536870912) @@ -8991,7 +9122,7 @@ ::google::protobuf::uint8* FileOptions::InternalSerializeWithCachedSizesToArray( if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); + _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FileOptions) return target; @@ -9006,16 +9137,16 @@ size_t FileOptions::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); + _internal_metadata_.unknown_fields()); } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; { - unsigned int count = this->uninterpreted_option_size(); + unsigned int count = static_cast(this->uninterpreted_option_size()); total_size += 2UL * count; for (unsigned int i = 0; i < count; i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->uninterpreted_option(i)); + this->uninterpreted_option(static_cast(i))); } } @@ -9241,6 +9372,7 @@ void FileOptions::Swap(FileOptions* other) { InternalSwap(other); } void FileOptions::InternalSwap(FileOptions* other) { + using std::swap; uninterpreted_option_.InternalSwap(&other->uninterpreted_option_); java_package_.Swap(&other->java_package_); java_outer_classname_.Swap(&other->java_outer_classname_); @@ -9249,18 +9381,18 @@ void FileOptions::InternalSwap(FileOptions* other) { csharp_namespace_.Swap(&other->csharp_namespace_); swift_prefix_.Swap(&other->swift_prefix_); php_class_prefix_.Swap(&other->php_class_prefix_); - std::swap(java_multiple_files_, other->java_multiple_files_); - std::swap(java_generate_equals_and_hash_, other->java_generate_equals_and_hash_); - std::swap(java_string_check_utf8_, other->java_string_check_utf8_); - std::swap(cc_generic_services_, other->cc_generic_services_); - std::swap(java_generic_services_, other->java_generic_services_); - std::swap(py_generic_services_, other->py_generic_services_); - std::swap(deprecated_, other->deprecated_); - std::swap(cc_enable_arenas_, other->cc_enable_arenas_); - std::swap(optimize_for_, other->optimize_for_); - std::swap(_has_bits_[0], other->_has_bits_[0]); + swap(java_multiple_files_, other->java_multiple_files_); + swap(java_generate_equals_and_hash_, other->java_generate_equals_and_hash_); + swap(java_string_check_utf8_, other->java_string_check_utf8_); + swap(cc_generic_services_, other->cc_generic_services_); + swap(java_generic_services_, other->java_generic_services_); + swap(py_generic_services_, other->py_generic_services_); + swap(deprecated_, other->deprecated_); + swap(cc_enable_arenas_, other->cc_enable_arenas_); + swap(optimize_for_, other->optimize_for_); + swap(_has_bits_[0], other->_has_bits_[0]); _internal_metadata_.Swap(&other->_internal_metadata_); - std::swap(_cached_size_, other->_cached_size_); + swap(_cached_size_, other->_cached_size_); _extensions_.Swap(&other->_extensions_); } @@ -9989,15 +10121,16 @@ MessageOptions::MessageOptions(const MessageOptions& from) _internal_metadata_.MergeFrom(from._internal_metadata_); _extensions_.MergeFrom(from._extensions_); ::memcpy(&message_set_wire_format_, &from.message_set_wire_format_, - reinterpret_cast(&map_entry_) - - reinterpret_cast(&message_set_wire_format_) + sizeof(map_entry_)); + static_cast(reinterpret_cast(&map_entry_) - + reinterpret_cast(&message_set_wire_format_)) + sizeof(map_entry_)); // @@protoc_insertion_point(copy_constructor:google.protobuf.MessageOptions) } void MessageOptions::SharedCtor() { _cached_size_ = 0; - ::memset(&message_set_wire_format_, 0, reinterpret_cast(&map_entry_) - - reinterpret_cast(&message_set_wire_format_) + sizeof(map_entry_)); + ::memset(&message_set_wire_format_, 0, static_cast( + reinterpret_cast(&map_entry_) - + reinterpret_cast(&message_set_wire_format_)) + sizeof(map_entry_)); } MessageOptions::~MessageOptions() { @@ -10033,11 +10166,17 @@ MessageOptions* MessageOptions::New(::google::protobuf::Arena* arena) const { void MessageOptions::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.MessageOptions) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + _extensions_.Clear(); uninterpreted_option_.Clear(); - if (_has_bits_[0 / 32] & 15u) { - ::memset(&message_set_wire_format_, 0, reinterpret_cast(&map_entry_) - - reinterpret_cast(&message_set_wire_format_) + sizeof(map_entry_)); + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 15u) { + ::memset(&message_set_wire_format_, 0, static_cast( + reinterpret_cast(&map_entry_) - + reinterpret_cast(&message_set_wire_format_)) + sizeof(map_entry_)); } _has_bits_.Clear(); _internal_metadata_.Clear(); @@ -10056,7 +10195,7 @@ bool MessageOptions::MergePartialFromCodedStream( // optional bool message_set_wire_format = 1 [default = false]; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(8u)) { + static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { set_has_message_set_wire_format(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -10070,7 +10209,7 @@ bool MessageOptions::MergePartialFromCodedStream( // optional bool no_standard_descriptor_accessor = 2 [default = false]; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(16u)) { + static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { set_has_no_standard_descriptor_accessor(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -10084,7 +10223,7 @@ bool MessageOptions::MergePartialFromCodedStream( // optional bool deprecated = 3 [default = false]; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(24u)) { + static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) { set_has_deprecated(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -10098,7 +10237,7 @@ bool MessageOptions::MergePartialFromCodedStream( // optional bool map_entry = 7; case 7: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(56u)) { + static_cast< ::google::protobuf::uint8>(56u /* 56 & 0xFF */)) { set_has_map_entry(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -10112,7 +10251,7 @@ bool MessageOptions::MergePartialFromCodedStream( // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; case 999: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(7994u)) { + static_cast< ::google::protobuf::uint8>(58u /* 7994 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, add_uninterpreted_option())); } else { @@ -10123,18 +10262,17 @@ bool MessageOptions::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; } if ((8000u <= tag)) { - DO_(_extensions_.ParseField(tag, input, internal_default_instance(), - mutable_unknown_fields())); + DO_(_extensions_.ParseField(tag, input, + internal_default_instance(), + _internal_metadata_.mutable_unknown_fields())); continue; } DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -10176,9 +10314,10 @@ void MessageOptions::SerializeWithCachedSizes( } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->uninterpreted_option_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 999, this->uninterpreted_option(i), output); + 999, this->uninterpreted_option(static_cast(i)), output); } // Extension range [1000, 536870912) @@ -10187,7 +10326,7 @@ void MessageOptions::SerializeWithCachedSizes( if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); + _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.MessageOptions) } @@ -10221,10 +10360,11 @@ ::google::protobuf::uint8* MessageOptions::InternalSerializeWithCachedSizesToArr } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->uninterpreted_option_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageNoVirtualToArray( - 999, this->uninterpreted_option(i), deterministic, target); + 999, this->uninterpreted_option(static_cast(i)), deterministic, target); } // Extension range [1000, 536870912) @@ -10233,7 +10373,7 @@ ::google::protobuf::uint8* MessageOptions::InternalSerializeWithCachedSizesToArr if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); + _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.MessageOptions) return target; @@ -10248,16 +10388,16 @@ size_t MessageOptions::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); + _internal_metadata_.unknown_fields()); } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; { - unsigned int count = this->uninterpreted_option_size(); + unsigned int count = static_cast(this->uninterpreted_option_size()); total_size += 2UL * count; for (unsigned int i = 0; i < count; i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->uninterpreted_option(i)); + this->uninterpreted_option(static_cast(i))); } } @@ -10360,14 +10500,15 @@ void MessageOptions::Swap(MessageOptions* other) { InternalSwap(other); } void MessageOptions::InternalSwap(MessageOptions* other) { + using std::swap; uninterpreted_option_.InternalSwap(&other->uninterpreted_option_); - std::swap(message_set_wire_format_, other->message_set_wire_format_); - std::swap(no_standard_descriptor_accessor_, other->no_standard_descriptor_accessor_); - std::swap(deprecated_, other->deprecated_); - std::swap(map_entry_, other->map_entry_); - std::swap(_has_bits_[0], other->_has_bits_[0]); + swap(message_set_wire_format_, other->message_set_wire_format_); + swap(no_standard_descriptor_accessor_, other->no_standard_descriptor_accessor_); + swap(deprecated_, other->deprecated_); + swap(map_entry_, other->map_entry_); + swap(_has_bits_[0], other->_has_bits_[0]); _internal_metadata_.Swap(&other->_internal_metadata_); - std::swap(_cached_size_, other->_cached_size_); + swap(_cached_size_, other->_cached_size_); _extensions_.Swap(&other->_extensions_); } @@ -10536,15 +10677,16 @@ FieldOptions::FieldOptions(const FieldOptions& from) _internal_metadata_.MergeFrom(from._internal_metadata_); _extensions_.MergeFrom(from._extensions_); ::memcpy(&ctype_, &from.ctype_, - reinterpret_cast(&jstype_) - - reinterpret_cast(&ctype_) + sizeof(jstype_)); + static_cast(reinterpret_cast(&jstype_) - + reinterpret_cast(&ctype_)) + sizeof(jstype_)); // @@protoc_insertion_point(copy_constructor:google.protobuf.FieldOptions) } void FieldOptions::SharedCtor() { _cached_size_ = 0; - ::memset(&ctype_, 0, reinterpret_cast(&jstype_) - - reinterpret_cast(&ctype_) + sizeof(jstype_)); + ::memset(&ctype_, 0, static_cast( + reinterpret_cast(&jstype_) - + reinterpret_cast(&ctype_)) + sizeof(jstype_)); } FieldOptions::~FieldOptions() { @@ -10580,11 +10722,17 @@ FieldOptions* FieldOptions::New(::google::protobuf::Arena* arena) const { void FieldOptions::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.FieldOptions) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + _extensions_.Clear(); uninterpreted_option_.Clear(); - if (_has_bits_[0 / 32] & 63u) { - ::memset(&ctype_, 0, reinterpret_cast(&jstype_) - - reinterpret_cast(&ctype_) + sizeof(jstype_)); + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 63u) { + ::memset(&ctype_, 0, static_cast( + reinterpret_cast(&jstype_) - + reinterpret_cast(&ctype_)) + sizeof(jstype_)); } _has_bits_.Clear(); _internal_metadata_.Clear(); @@ -10603,7 +10751,7 @@ bool FieldOptions::MergePartialFromCodedStream( // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING]; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(8u)) { + static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( @@ -10611,7 +10759,8 @@ bool FieldOptions::MergePartialFromCodedStream( if (::google::protobuf::FieldOptions_CType_IsValid(value)) { set_ctype(static_cast< ::google::protobuf::FieldOptions_CType >(value)); } else { - mutable_unknown_fields()->AddVarint(1, value); + mutable_unknown_fields()->AddVarint( + 1, static_cast< ::google::protobuf::uint64>(value)); } } else { goto handle_unusual; @@ -10622,7 +10771,7 @@ bool FieldOptions::MergePartialFromCodedStream( // optional bool packed = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(16u)) { + static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { set_has_packed(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -10636,7 +10785,7 @@ bool FieldOptions::MergePartialFromCodedStream( // optional bool deprecated = 3 [default = false]; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(24u)) { + static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) { set_has_deprecated(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -10650,7 +10799,7 @@ bool FieldOptions::MergePartialFromCodedStream( // optional bool lazy = 5 [default = false]; case 5: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(40u)) { + static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) { set_has_lazy(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -10664,7 +10813,7 @@ bool FieldOptions::MergePartialFromCodedStream( // optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL]; case 6: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(48u)) { + static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) { int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( @@ -10672,7 +10821,8 @@ bool FieldOptions::MergePartialFromCodedStream( if (::google::protobuf::FieldOptions_JSType_IsValid(value)) { set_jstype(static_cast< ::google::protobuf::FieldOptions_JSType >(value)); } else { - mutable_unknown_fields()->AddVarint(6, value); + mutable_unknown_fields()->AddVarint( + 6, static_cast< ::google::protobuf::uint64>(value)); } } else { goto handle_unusual; @@ -10683,7 +10833,7 @@ bool FieldOptions::MergePartialFromCodedStream( // optional bool weak = 10 [default = false]; case 10: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(80u)) { + static_cast< ::google::protobuf::uint8>(80u /* 80 & 0xFF */)) { set_has_weak(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -10697,7 +10847,7 @@ bool FieldOptions::MergePartialFromCodedStream( // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; case 999: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(7994u)) { + static_cast< ::google::protobuf::uint8>(58u /* 7994 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, add_uninterpreted_option())); } else { @@ -10708,18 +10858,17 @@ bool FieldOptions::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; } if ((8000u <= tag)) { - DO_(_extensions_.ParseField(tag, input, internal_default_instance(), - mutable_unknown_fields())); + DO_(_extensions_.ParseField(tag, input, + internal_default_instance(), + _internal_metadata_.mutable_unknown_fields())); continue; } DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -10773,9 +10922,10 @@ void FieldOptions::SerializeWithCachedSizes( } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->uninterpreted_option_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 999, this->uninterpreted_option(i), output); + 999, this->uninterpreted_option(static_cast(i)), output); } // Extension range [1000, 536870912) @@ -10784,7 +10934,7 @@ void FieldOptions::SerializeWithCachedSizes( if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); + _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.FieldOptions) } @@ -10830,10 +10980,11 @@ ::google::protobuf::uint8* FieldOptions::InternalSerializeWithCachedSizesToArray } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->uninterpreted_option_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageNoVirtualToArray( - 999, this->uninterpreted_option(i), deterministic, target); + 999, this->uninterpreted_option(static_cast(i)), deterministic, target); } // Extension range [1000, 536870912) @@ -10842,7 +10993,7 @@ ::google::protobuf::uint8* FieldOptions::InternalSerializeWithCachedSizesToArray if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); + _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FieldOptions) return target; @@ -10857,16 +11008,16 @@ size_t FieldOptions::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); + _internal_metadata_.unknown_fields()); } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; { - unsigned int count = this->uninterpreted_option_size(); + unsigned int count = static_cast(this->uninterpreted_option_size()); total_size += 2UL * count; for (unsigned int i = 0; i < count; i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->uninterpreted_option(i)); + this->uninterpreted_option(static_cast(i))); } } @@ -10987,16 +11138,17 @@ void FieldOptions::Swap(FieldOptions* other) { InternalSwap(other); } void FieldOptions::InternalSwap(FieldOptions* other) { + using std::swap; uninterpreted_option_.InternalSwap(&other->uninterpreted_option_); - std::swap(ctype_, other->ctype_); - std::swap(packed_, other->packed_); - std::swap(lazy_, other->lazy_); - std::swap(deprecated_, other->deprecated_); - std::swap(weak_, other->weak_); - std::swap(jstype_, other->jstype_); - std::swap(_has_bits_[0], other->_has_bits_[0]); + swap(ctype_, other->ctype_); + swap(packed_, other->packed_); + swap(lazy_, other->lazy_); + swap(deprecated_, other->deprecated_); + swap(weak_, other->weak_); + swap(jstype_, other->jstype_); + swap(_has_bits_[0], other->_has_bits_[0]); _internal_metadata_.Swap(&other->_internal_metadata_); - std::swap(_cached_size_, other->_cached_size_); + swap(_cached_size_, other->_cached_size_); _extensions_.Swap(&other->_extensions_); } @@ -11248,6 +11400,10 @@ OneofOptions* OneofOptions::New(::google::protobuf::Arena* arena) const { void OneofOptions::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.OneofOptions) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + _extensions_.Clear(); uninterpreted_option_.Clear(); _has_bits_.Clear(); @@ -11267,7 +11423,7 @@ bool OneofOptions::MergePartialFromCodedStream( // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; case 999: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(7994u)) { + static_cast< ::google::protobuf::uint8>(58u /* 7994 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, add_uninterpreted_option())); } else { @@ -11278,18 +11434,17 @@ bool OneofOptions::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; } if ((8000u <= tag)) { - DO_(_extensions_.ParseField(tag, input, internal_default_instance(), - mutable_unknown_fields())); + DO_(_extensions_.ParseField(tag, input, + internal_default_instance(), + _internal_metadata_.mutable_unknown_fields())); continue; } DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -11310,9 +11465,10 @@ void OneofOptions::SerializeWithCachedSizes( (void) cached_has_bits; // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->uninterpreted_option_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 999, this->uninterpreted_option(i), output); + 999, this->uninterpreted_option(static_cast(i)), output); } // Extension range [1000, 536870912) @@ -11321,7 +11477,7 @@ void OneofOptions::SerializeWithCachedSizes( if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); + _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.OneofOptions) } @@ -11334,10 +11490,11 @@ ::google::protobuf::uint8* OneofOptions::InternalSerializeWithCachedSizesToArray (void) cached_has_bits; // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->uninterpreted_option_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageNoVirtualToArray( - 999, this->uninterpreted_option(i), deterministic, target); + 999, this->uninterpreted_option(static_cast(i)), deterministic, target); } // Extension range [1000, 536870912) @@ -11346,7 +11503,7 @@ ::google::protobuf::uint8* OneofOptions::InternalSerializeWithCachedSizesToArray if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); + _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.OneofOptions) return target; @@ -11361,16 +11518,16 @@ size_t OneofOptions::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); + _internal_metadata_.unknown_fields()); } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; { - unsigned int count = this->uninterpreted_option_size(); + unsigned int count = static_cast(this->uninterpreted_option_size()); total_size += 2UL * count; for (unsigned int i = 0; i < count; i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->uninterpreted_option(i)); + this->uninterpreted_option(static_cast(i))); } } @@ -11435,10 +11592,11 @@ void OneofOptions::Swap(OneofOptions* other) { InternalSwap(other); } void OneofOptions::InternalSwap(OneofOptions* other) { + using std::swap; uninterpreted_option_.InternalSwap(&other->uninterpreted_option_); - std::swap(_has_bits_[0], other->_has_bits_[0]); + swap(_has_bits_[0], other->_has_bits_[0]); _internal_metadata_.Swap(&other->_internal_metadata_); - std::swap(_cached_size_, other->_cached_size_); + swap(_cached_size_, other->_cached_size_); _extensions_.Swap(&other->_extensions_); } @@ -11507,15 +11665,16 @@ EnumOptions::EnumOptions(const EnumOptions& from) _internal_metadata_.MergeFrom(from._internal_metadata_); _extensions_.MergeFrom(from._extensions_); ::memcpy(&allow_alias_, &from.allow_alias_, - reinterpret_cast(&deprecated_) - - reinterpret_cast(&allow_alias_) + sizeof(deprecated_)); + static_cast(reinterpret_cast(&deprecated_) - + reinterpret_cast(&allow_alias_)) + sizeof(deprecated_)); // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumOptions) } void EnumOptions::SharedCtor() { _cached_size_ = 0; - ::memset(&allow_alias_, 0, reinterpret_cast(&deprecated_) - - reinterpret_cast(&allow_alias_) + sizeof(deprecated_)); + ::memset(&allow_alias_, 0, static_cast( + reinterpret_cast(&deprecated_) - + reinterpret_cast(&allow_alias_)) + sizeof(deprecated_)); } EnumOptions::~EnumOptions() { @@ -11551,11 +11710,17 @@ EnumOptions* EnumOptions::New(::google::protobuf::Arena* arena) const { void EnumOptions::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.EnumOptions) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + _extensions_.Clear(); uninterpreted_option_.Clear(); - if (_has_bits_[0 / 32] & 3u) { - ::memset(&allow_alias_, 0, reinterpret_cast(&deprecated_) - - reinterpret_cast(&allow_alias_) + sizeof(deprecated_)); + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 3u) { + ::memset(&allow_alias_, 0, static_cast( + reinterpret_cast(&deprecated_) - + reinterpret_cast(&allow_alias_)) + sizeof(deprecated_)); } _has_bits_.Clear(); _internal_metadata_.Clear(); @@ -11574,7 +11739,7 @@ bool EnumOptions::MergePartialFromCodedStream( // optional bool allow_alias = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(16u)) { + static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { set_has_allow_alias(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -11588,7 +11753,7 @@ bool EnumOptions::MergePartialFromCodedStream( // optional bool deprecated = 3 [default = false]; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(24u)) { + static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) { set_has_deprecated(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -11602,7 +11767,7 @@ bool EnumOptions::MergePartialFromCodedStream( // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; case 999: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(7994u)) { + static_cast< ::google::protobuf::uint8>(58u /* 7994 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, add_uninterpreted_option())); } else { @@ -11613,18 +11778,17 @@ bool EnumOptions::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; } if ((8000u <= tag)) { - DO_(_extensions_.ParseField(tag, input, internal_default_instance(), - mutable_unknown_fields())); + DO_(_extensions_.ParseField(tag, input, + internal_default_instance(), + _internal_metadata_.mutable_unknown_fields())); continue; } DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -11656,9 +11820,10 @@ void EnumOptions::SerializeWithCachedSizes( } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->uninterpreted_option_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 999, this->uninterpreted_option(i), output); + 999, this->uninterpreted_option(static_cast(i)), output); } // Extension range [1000, 536870912) @@ -11667,7 +11832,7 @@ void EnumOptions::SerializeWithCachedSizes( if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); + _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.EnumOptions) } @@ -11691,10 +11856,11 @@ ::google::protobuf::uint8* EnumOptions::InternalSerializeWithCachedSizesToArray( } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->uninterpreted_option_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageNoVirtualToArray( - 999, this->uninterpreted_option(i), deterministic, target); + 999, this->uninterpreted_option(static_cast(i)), deterministic, target); } // Extension range [1000, 536870912) @@ -11703,7 +11869,7 @@ ::google::protobuf::uint8* EnumOptions::InternalSerializeWithCachedSizesToArray( if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); + _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumOptions) return target; @@ -11718,16 +11884,16 @@ size_t EnumOptions::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); + _internal_metadata_.unknown_fields()); } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; { - unsigned int count = this->uninterpreted_option_size(); + unsigned int count = static_cast(this->uninterpreted_option_size()); total_size += 2UL * count; for (unsigned int i = 0; i < count; i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->uninterpreted_option(i)); + this->uninterpreted_option(static_cast(i))); } } @@ -11814,12 +11980,13 @@ void EnumOptions::Swap(EnumOptions* other) { InternalSwap(other); } void EnumOptions::InternalSwap(EnumOptions* other) { + using std::swap; uninterpreted_option_.InternalSwap(&other->uninterpreted_option_); - std::swap(allow_alias_, other->allow_alias_); - std::swap(deprecated_, other->deprecated_); - std::swap(_has_bits_[0], other->_has_bits_[0]); + swap(allow_alias_, other->allow_alias_); + swap(deprecated_, other->deprecated_); + swap(_has_bits_[0], other->_has_bits_[0]); _internal_metadata_.Swap(&other->_internal_metadata_); - std::swap(_cached_size_, other->_cached_size_); + swap(_cached_size_, other->_cached_size_); _extensions_.Swap(&other->_extensions_); } @@ -11976,6 +12143,10 @@ EnumValueOptions* EnumValueOptions::New(::google::protobuf::Arena* arena) const void EnumValueOptions::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.EnumValueOptions) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + _extensions_.Clear(); uninterpreted_option_.Clear(); deprecated_ = false; @@ -11996,7 +12167,7 @@ bool EnumValueOptions::MergePartialFromCodedStream( // optional bool deprecated = 1 [default = false]; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(8u)) { + static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { set_has_deprecated(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -12010,7 +12181,7 @@ bool EnumValueOptions::MergePartialFromCodedStream( // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; case 999: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(7994u)) { + static_cast< ::google::protobuf::uint8>(58u /* 7994 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, add_uninterpreted_option())); } else { @@ -12021,18 +12192,17 @@ bool EnumValueOptions::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; } if ((8000u <= tag)) { - DO_(_extensions_.ParseField(tag, input, internal_default_instance(), - mutable_unknown_fields())); + DO_(_extensions_.ParseField(tag, input, + internal_default_instance(), + _internal_metadata_.mutable_unknown_fields())); continue; } DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -12059,9 +12229,10 @@ void EnumValueOptions::SerializeWithCachedSizes( } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->uninterpreted_option_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 999, this->uninterpreted_option(i), output); + 999, this->uninterpreted_option(static_cast(i)), output); } // Extension range [1000, 536870912) @@ -12070,7 +12241,7 @@ void EnumValueOptions::SerializeWithCachedSizes( if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); + _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.EnumValueOptions) } @@ -12089,10 +12260,11 @@ ::google::protobuf::uint8* EnumValueOptions::InternalSerializeWithCachedSizesToA } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->uninterpreted_option_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageNoVirtualToArray( - 999, this->uninterpreted_option(i), deterministic, target); + 999, this->uninterpreted_option(static_cast(i)), deterministic, target); } // Extension range [1000, 536870912) @@ -12101,7 +12273,7 @@ ::google::protobuf::uint8* EnumValueOptions::InternalSerializeWithCachedSizesToA if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); + _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumValueOptions) return target; @@ -12116,16 +12288,16 @@ size_t EnumValueOptions::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); + _internal_metadata_.unknown_fields()); } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; { - unsigned int count = this->uninterpreted_option_size(); + unsigned int count = static_cast(this->uninterpreted_option_size()); total_size += 2UL * count; for (unsigned int i = 0; i < count; i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->uninterpreted_option(i)); + this->uninterpreted_option(static_cast(i))); } } @@ -12198,11 +12370,12 @@ void EnumValueOptions::Swap(EnumValueOptions* other) { InternalSwap(other); } void EnumValueOptions::InternalSwap(EnumValueOptions* other) { + using std::swap; uninterpreted_option_.InternalSwap(&other->uninterpreted_option_); - std::swap(deprecated_, other->deprecated_); - std::swap(_has_bits_[0], other->_has_bits_[0]); + swap(deprecated_, other->deprecated_); + swap(_has_bits_[0], other->_has_bits_[0]); _internal_metadata_.Swap(&other->_internal_metadata_); - std::swap(_cached_size_, other->_cached_size_); + swap(_cached_size_, other->_cached_size_); _extensions_.Swap(&other->_extensions_); } @@ -12335,6 +12508,10 @@ ServiceOptions* ServiceOptions::New(::google::protobuf::Arena* arena) const { void ServiceOptions::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.ServiceOptions) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + _extensions_.Clear(); uninterpreted_option_.Clear(); deprecated_ = false; @@ -12355,7 +12532,7 @@ bool ServiceOptions::MergePartialFromCodedStream( // optional bool deprecated = 33 [default = false]; case 33: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(264u)) { + static_cast< ::google::protobuf::uint8>(8u /* 264 & 0xFF */)) { set_has_deprecated(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -12369,7 +12546,7 @@ bool ServiceOptions::MergePartialFromCodedStream( // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; case 999: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(7994u)) { + static_cast< ::google::protobuf::uint8>(58u /* 7994 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, add_uninterpreted_option())); } else { @@ -12380,18 +12557,17 @@ bool ServiceOptions::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; } if ((8000u <= tag)) { - DO_(_extensions_.ParseField(tag, input, internal_default_instance(), - mutable_unknown_fields())); + DO_(_extensions_.ParseField(tag, input, + internal_default_instance(), + _internal_metadata_.mutable_unknown_fields())); continue; } DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -12418,9 +12594,10 @@ void ServiceOptions::SerializeWithCachedSizes( } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->uninterpreted_option_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 999, this->uninterpreted_option(i), output); + 999, this->uninterpreted_option(static_cast(i)), output); } // Extension range [1000, 536870912) @@ -12429,7 +12606,7 @@ void ServiceOptions::SerializeWithCachedSizes( if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); + _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.ServiceOptions) } @@ -12448,10 +12625,11 @@ ::google::protobuf::uint8* ServiceOptions::InternalSerializeWithCachedSizesToArr } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->uninterpreted_option_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageNoVirtualToArray( - 999, this->uninterpreted_option(i), deterministic, target); + 999, this->uninterpreted_option(static_cast(i)), deterministic, target); } // Extension range [1000, 536870912) @@ -12460,7 +12638,7 @@ ::google::protobuf::uint8* ServiceOptions::InternalSerializeWithCachedSizesToArr if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); + _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.ServiceOptions) return target; @@ -12475,16 +12653,16 @@ size_t ServiceOptions::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); + _internal_metadata_.unknown_fields()); } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; { - unsigned int count = this->uninterpreted_option_size(); + unsigned int count = static_cast(this->uninterpreted_option_size()); total_size += 2UL * count; for (unsigned int i = 0; i < count; i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->uninterpreted_option(i)); + this->uninterpreted_option(static_cast(i))); } } @@ -12557,11 +12735,12 @@ void ServiceOptions::Swap(ServiceOptions* other) { InternalSwap(other); } void ServiceOptions::InternalSwap(ServiceOptions* other) { + using std::swap; uninterpreted_option_.InternalSwap(&other->uninterpreted_option_); - std::swap(deprecated_, other->deprecated_); - std::swap(_has_bits_[0], other->_has_bits_[0]); + swap(deprecated_, other->deprecated_); + swap(_has_bits_[0], other->_has_bits_[0]); _internal_metadata_.Swap(&other->_internal_metadata_); - std::swap(_cached_size_, other->_cached_size_); + swap(_cached_size_, other->_cached_size_); _extensions_.Swap(&other->_extensions_); } @@ -12654,15 +12833,16 @@ MethodOptions::MethodOptions(const MethodOptions& from) _internal_metadata_.MergeFrom(from._internal_metadata_); _extensions_.MergeFrom(from._extensions_); ::memcpy(&deprecated_, &from.deprecated_, - reinterpret_cast(&idempotency_level_) - - reinterpret_cast(&deprecated_) + sizeof(idempotency_level_)); + static_cast(reinterpret_cast(&idempotency_level_) - + reinterpret_cast(&deprecated_)) + sizeof(idempotency_level_)); // @@protoc_insertion_point(copy_constructor:google.protobuf.MethodOptions) } void MethodOptions::SharedCtor() { _cached_size_ = 0; - ::memset(&deprecated_, 0, reinterpret_cast(&idempotency_level_) - - reinterpret_cast(&deprecated_) + sizeof(idempotency_level_)); + ::memset(&deprecated_, 0, static_cast( + reinterpret_cast(&idempotency_level_) - + reinterpret_cast(&deprecated_)) + sizeof(idempotency_level_)); } MethodOptions::~MethodOptions() { @@ -12698,11 +12878,17 @@ MethodOptions* MethodOptions::New(::google::protobuf::Arena* arena) const { void MethodOptions::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.MethodOptions) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + _extensions_.Clear(); uninterpreted_option_.Clear(); - if (_has_bits_[0 / 32] & 3u) { - ::memset(&deprecated_, 0, reinterpret_cast(&idempotency_level_) - - reinterpret_cast(&deprecated_) + sizeof(idempotency_level_)); + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 3u) { + ::memset(&deprecated_, 0, static_cast( + reinterpret_cast(&idempotency_level_) - + reinterpret_cast(&deprecated_)) + sizeof(idempotency_level_)); } _has_bits_.Clear(); _internal_metadata_.Clear(); @@ -12721,7 +12907,7 @@ bool MethodOptions::MergePartialFromCodedStream( // optional bool deprecated = 33 [default = false]; case 33: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(264u)) { + static_cast< ::google::protobuf::uint8>(8u /* 264 & 0xFF */)) { set_has_deprecated(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -12735,7 +12921,7 @@ bool MethodOptions::MergePartialFromCodedStream( // optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN]; case 34: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(272u)) { + static_cast< ::google::protobuf::uint8>(16u /* 272 & 0xFF */)) { int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( @@ -12743,7 +12929,8 @@ bool MethodOptions::MergePartialFromCodedStream( if (::google::protobuf::MethodOptions_IdempotencyLevel_IsValid(value)) { set_idempotency_level(static_cast< ::google::protobuf::MethodOptions_IdempotencyLevel >(value)); } else { - mutable_unknown_fields()->AddVarint(34, value); + mutable_unknown_fields()->AddVarint( + 34, static_cast< ::google::protobuf::uint64>(value)); } } else { goto handle_unusual; @@ -12754,7 +12941,7 @@ bool MethodOptions::MergePartialFromCodedStream( // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; case 999: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(7994u)) { + static_cast< ::google::protobuf::uint8>(58u /* 7994 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, add_uninterpreted_option())); } else { @@ -12765,18 +12952,17 @@ bool MethodOptions::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; } if ((8000u <= tag)) { - DO_(_extensions_.ParseField(tag, input, internal_default_instance(), - mutable_unknown_fields())); + DO_(_extensions_.ParseField(tag, input, + internal_default_instance(), + _internal_metadata_.mutable_unknown_fields())); continue; } DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -12809,9 +12995,10 @@ void MethodOptions::SerializeWithCachedSizes( } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->uninterpreted_option_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 999, this->uninterpreted_option(i), output); + 999, this->uninterpreted_option(static_cast(i)), output); } // Extension range [1000, 536870912) @@ -12820,7 +13007,7 @@ void MethodOptions::SerializeWithCachedSizes( if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); + _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.MethodOptions) } @@ -12845,10 +13032,11 @@ ::google::protobuf::uint8* MethodOptions::InternalSerializeWithCachedSizesToArra } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->uninterpreted_option_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageNoVirtualToArray( - 999, this->uninterpreted_option(i), deterministic, target); + 999, this->uninterpreted_option(static_cast(i)), deterministic, target); } // Extension range [1000, 536870912) @@ -12857,7 +13045,7 @@ ::google::protobuf::uint8* MethodOptions::InternalSerializeWithCachedSizesToArra if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); + _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.MethodOptions) return target; @@ -12872,16 +13060,16 @@ size_t MethodOptions::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); + _internal_metadata_.unknown_fields()); } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; { - unsigned int count = this->uninterpreted_option_size(); + unsigned int count = static_cast(this->uninterpreted_option_size()); total_size += 2UL * count; for (unsigned int i = 0; i < count; i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->uninterpreted_option(i)); + this->uninterpreted_option(static_cast(i))); } } @@ -12969,12 +13157,13 @@ void MethodOptions::Swap(MethodOptions* other) { InternalSwap(other); } void MethodOptions::InternalSwap(MethodOptions* other) { + using std::swap; uninterpreted_option_.InternalSwap(&other->uninterpreted_option_); - std::swap(deprecated_, other->deprecated_); - std::swap(idempotency_level_, other->idempotency_level_); - std::swap(_has_bits_[0], other->_has_bits_[0]); + swap(deprecated_, other->deprecated_); + swap(idempotency_level_, other->idempotency_level_); + swap(_has_bits_[0], other->_has_bits_[0]); _internal_metadata_.Swap(&other->_internal_metadata_); - std::swap(_cached_size_, other->_cached_size_); + swap(_cached_size_, other->_cached_size_); _extensions_.Swap(&other->_extensions_); } @@ -13136,6 +13325,10 @@ UninterpretedOption_NamePart* UninterpretedOption_NamePart::New(::google::protob void UninterpretedOption_NamePart::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.UninterpretedOption.NamePart) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + if (has_name_part()) { GOOGLE_DCHECK(!name_part_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); (*name_part_.UnsafeRawStringPointer())->clear(); @@ -13158,11 +13351,11 @@ bool UninterpretedOption_NamePart::MergePartialFromCodedStream( // required string name_part = 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->mutable_name_part())); ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->name_part().data(), this->name_part().length(), + this->name_part().data(), static_cast(this->name_part().length()), ::google::protobuf::internal::WireFormat::PARSE, "google.protobuf.UninterpretedOption.NamePart.name_part"); } else { @@ -13174,7 +13367,7 @@ bool UninterpretedOption_NamePart::MergePartialFromCodedStream( // required bool is_extension = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(16u)) { + static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { set_has_is_extension(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -13187,13 +13380,11 @@ bool UninterpretedOption_NamePart::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::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -13217,7 +13408,7 @@ void UninterpretedOption_NamePart::SerializeWithCachedSizes( // required string name_part = 1; if (cached_has_bits & 0x00000001u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->name_part().data(), this->name_part().length(), + this->name_part().data(), static_cast(this->name_part().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.UninterpretedOption.NamePart.name_part"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( @@ -13231,7 +13422,7 @@ void UninterpretedOption_NamePart::SerializeWithCachedSizes( if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); + _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.UninterpretedOption.NamePart) } @@ -13247,7 +13438,7 @@ ::google::protobuf::uint8* UninterpretedOption_NamePart::InternalSerializeWithCa // required string name_part = 1; if (cached_has_bits & 0x00000001u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->name_part().data(), this->name_part().length(), + this->name_part().data(), static_cast(this->name_part().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.UninterpretedOption.NamePart.name_part"); target = @@ -13262,7 +13453,7 @@ ::google::protobuf::uint8* UninterpretedOption_NamePart::InternalSerializeWithCa if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); + _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.UninterpretedOption.NamePart) return target; @@ -13293,7 +13484,7 @@ size_t UninterpretedOption_NamePart::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); + _internal_metadata_.unknown_fields()); } if (((_has_bits_[0] & 0x00000003) ^ 0x00000003) == 0) { // All required fields are present. // required string name_part = 1; @@ -13373,11 +13564,12 @@ void UninterpretedOption_NamePart::Swap(UninterpretedOption_NamePart* other) { InternalSwap(other); } void UninterpretedOption_NamePart::InternalSwap(UninterpretedOption_NamePart* other) { + using std::swap; name_part_.Swap(&other->name_part_); - std::swap(is_extension_, other->is_extension_); - std::swap(_has_bits_[0], other->_has_bits_[0]); + swap(is_extension_, other->is_extension_); + swap(_has_bits_[0], other->_has_bits_[0]); _internal_metadata_.Swap(&other->_internal_metadata_); - std::swap(_cached_size_, other->_cached_size_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata UninterpretedOption_NamePart::GetMetadata() const { @@ -13517,8 +13709,8 @@ UninterpretedOption::UninterpretedOption(const UninterpretedOption& from) aggregate_value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.aggregate_value_); } ::memcpy(&positive_int_value_, &from.positive_int_value_, - reinterpret_cast(&double_value_) - - reinterpret_cast(&positive_int_value_) + sizeof(double_value_)); + static_cast(reinterpret_cast(&double_value_) - + reinterpret_cast(&positive_int_value_)) + sizeof(double_value_)); // @@protoc_insertion_point(copy_constructor:google.protobuf.UninterpretedOption) } @@ -13527,8 +13719,9 @@ void UninterpretedOption::SharedCtor() { identifier_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); aggregate_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - ::memset(&positive_int_value_, 0, reinterpret_cast(&double_value_) - - reinterpret_cast(&positive_int_value_) + sizeof(double_value_)); + ::memset(&positive_int_value_, 0, static_cast( + reinterpret_cast(&double_value_) - + reinterpret_cast(&positive_int_value_)) + sizeof(double_value_)); } UninterpretedOption::~UninterpretedOption() { @@ -13567,24 +13760,30 @@ UninterpretedOption* UninterpretedOption::New(::google::protobuf::Arena* arena) void UninterpretedOption::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.UninterpretedOption) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + name_.Clear(); - if (_has_bits_[0 / 32] & 7u) { - if (has_identifier_value()) { + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 7u) { + if (cached_has_bits & 0x00000001u) { GOOGLE_DCHECK(!identifier_value_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); (*identifier_value_.UnsafeRawStringPointer())->clear(); } - if (has_string_value()) { + if (cached_has_bits & 0x00000002u) { GOOGLE_DCHECK(!string_value_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); (*string_value_.UnsafeRawStringPointer())->clear(); } - if (has_aggregate_value()) { + if (cached_has_bits & 0x00000004u) { GOOGLE_DCHECK(!aggregate_value_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); (*aggregate_value_.UnsafeRawStringPointer())->clear(); } } - if (_has_bits_[0 / 32] & 56u) { - ::memset(&positive_int_value_, 0, reinterpret_cast(&double_value_) - - reinterpret_cast(&positive_int_value_) + sizeof(double_value_)); + if (cached_has_bits & 56u) { + ::memset(&positive_int_value_, 0, static_cast( + reinterpret_cast(&double_value_) - + reinterpret_cast(&positive_int_value_)) + sizeof(double_value_)); } _has_bits_.Clear(); _internal_metadata_.Clear(); @@ -13603,7 +13802,7 @@ bool UninterpretedOption::MergePartialFromCodedStream( // repeated .google.protobuf.UninterpretedOption.NamePart name = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(18u)) { + static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, add_name())); } else { @@ -13615,11 +13814,11 @@ bool UninterpretedOption::MergePartialFromCodedStream( // optional string identifier_value = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(26u)) { + static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_identifier_value())); ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->identifier_value().data(), this->identifier_value().length(), + this->identifier_value().data(), static_cast(this->identifier_value().length()), ::google::protobuf::internal::WireFormat::PARSE, "google.protobuf.UninterpretedOption.identifier_value"); } else { @@ -13631,7 +13830,7 @@ bool UninterpretedOption::MergePartialFromCodedStream( // optional uint64 positive_int_value = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(32u)) { + static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) { set_has_positive_int_value(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( @@ -13645,7 +13844,7 @@ bool UninterpretedOption::MergePartialFromCodedStream( // optional int64 negative_int_value = 5; case 5: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(40u)) { + static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) { set_has_negative_int_value(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( @@ -13659,7 +13858,7 @@ bool UninterpretedOption::MergePartialFromCodedStream( // optional double double_value = 6; case 6: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(49u)) { + static_cast< ::google::protobuf::uint8>(49u /* 49 & 0xFF */)) { set_has_double_value(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( @@ -13673,7 +13872,7 @@ bool UninterpretedOption::MergePartialFromCodedStream( // optional bytes string_value = 7; case 7: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(58u)) { + static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( input, this->mutable_string_value())); } else { @@ -13685,11 +13884,11 @@ bool UninterpretedOption::MergePartialFromCodedStream( // optional string aggregate_value = 8; case 8: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(66u)) { + static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_aggregate_value())); ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->aggregate_value().data(), this->aggregate_value().length(), + this->aggregate_value().data(), static_cast(this->aggregate_value().length()), ::google::protobuf::internal::WireFormat::PARSE, "google.protobuf.UninterpretedOption.aggregate_value"); } else { @@ -13700,13 +13899,11 @@ bool UninterpretedOption::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::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -13727,16 +13924,17 @@ void UninterpretedOption::SerializeWithCachedSizes( (void) cached_has_bits; // repeated .google.protobuf.UninterpretedOption.NamePart name = 2; - for (unsigned int i = 0, n = this->name_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->name_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 2, this->name(i), output); + 2, this->name(static_cast(i)), output); } cached_has_bits = _has_bits_[0]; // optional string identifier_value = 3; if (cached_has_bits & 0x00000001u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->identifier_value().data(), this->identifier_value().length(), + this->identifier_value().data(), static_cast(this->identifier_value().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.UninterpretedOption.identifier_value"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( @@ -13767,7 +13965,7 @@ void UninterpretedOption::SerializeWithCachedSizes( // optional string aggregate_value = 8; if (cached_has_bits & 0x00000004u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->aggregate_value().data(), this->aggregate_value().length(), + this->aggregate_value().data(), static_cast(this->aggregate_value().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.UninterpretedOption.aggregate_value"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( @@ -13776,7 +13974,7 @@ void UninterpretedOption::SerializeWithCachedSizes( if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); + _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.UninterpretedOption) } @@ -13789,17 +13987,18 @@ ::google::protobuf::uint8* UninterpretedOption::InternalSerializeWithCachedSizes (void) cached_has_bits; // repeated .google.protobuf.UninterpretedOption.NamePart name = 2; - for (unsigned int i = 0, n = this->name_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->name_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageNoVirtualToArray( - 2, this->name(i), deterministic, target); + 2, this->name(static_cast(i)), deterministic, target); } cached_has_bits = _has_bits_[0]; // optional string identifier_value = 3; if (cached_has_bits & 0x00000001u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->identifier_value().data(), this->identifier_value().length(), + this->identifier_value().data(), static_cast(this->identifier_value().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.UninterpretedOption.identifier_value"); target = @@ -13832,7 +14031,7 @@ ::google::protobuf::uint8* UninterpretedOption::InternalSerializeWithCachedSizes // optional string aggregate_value = 8; if (cached_has_bits & 0x00000004u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->aggregate_value().data(), this->aggregate_value().length(), + this->aggregate_value().data(), static_cast(this->aggregate_value().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.UninterpretedOption.aggregate_value"); target = @@ -13842,7 +14041,7 @@ ::google::protobuf::uint8* UninterpretedOption::InternalSerializeWithCachedSizes if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); + _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.UninterpretedOption) return target; @@ -13855,16 +14054,16 @@ size_t UninterpretedOption::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); + _internal_metadata_.unknown_fields()); } // repeated .google.protobuf.UninterpretedOption.NamePart name = 2; { - unsigned int count = this->name_size(); + unsigned int count = static_cast(this->name_size()); total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->name(i)); + this->name(static_cast(i))); } } @@ -13991,16 +14190,17 @@ void UninterpretedOption::Swap(UninterpretedOption* other) { InternalSwap(other); } void UninterpretedOption::InternalSwap(UninterpretedOption* other) { + using std::swap; name_.InternalSwap(&other->name_); identifier_value_.Swap(&other->identifier_value_); string_value_.Swap(&other->string_value_); aggregate_value_.Swap(&other->aggregate_value_); - std::swap(positive_int_value_, other->positive_int_value_); - std::swap(negative_int_value_, other->negative_int_value_); - std::swap(double_value_, other->double_value_); - std::swap(_has_bits_[0], other->_has_bits_[0]); + swap(positive_int_value_, other->positive_int_value_); + swap(negative_int_value_, other->negative_int_value_); + swap(double_value_, other->double_value_); + swap(_has_bits_[0], other->_has_bits_[0]); _internal_metadata_.Swap(&other->_internal_metadata_); - std::swap(_cached_size_, other->_cached_size_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata UninterpretedOption::GetMetadata() const { @@ -14383,15 +14583,20 @@ SourceCodeInfo_Location* SourceCodeInfo_Location::New(::google::protobuf::Arena* void SourceCodeInfo_Location::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.SourceCodeInfo.Location) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + path_.Clear(); span_.Clear(); leading_detached_comments_.Clear(); - if (_has_bits_[0 / 32] & 3u) { - if (has_leading_comments()) { + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 3u) { + if (cached_has_bits & 0x00000001u) { GOOGLE_DCHECK(!leading_comments_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); (*leading_comments_.UnsafeRawStringPointer())->clear(); } - if (has_trailing_comments()) { + if (cached_has_bits & 0x00000002u) { GOOGLE_DCHECK(!trailing_comments_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); (*trailing_comments_.UnsafeRawStringPointer())->clear(); } @@ -14413,12 +14618,13 @@ bool SourceCodeInfo_Location::MergePartialFromCodedStream( // repeated int32 path = 1 [packed = true]; 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::ReadPackedPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, this->mutable_path()))); - } else if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(8u)) { + } else if ( + static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( 1, 10u, input, this->mutable_path()))); @@ -14431,12 +14637,13 @@ bool SourceCodeInfo_Location::MergePartialFromCodedStream( // repeated int32 span = 2 [packed = true]; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(18u)) { + static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, this->mutable_span()))); - } else if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(16u)) { + } else if ( + static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( 1, 18u, input, this->mutable_span()))); @@ -14449,11 +14656,11 @@ bool SourceCodeInfo_Location::MergePartialFromCodedStream( // optional string leading_comments = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(26u)) { + static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_leading_comments())); ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->leading_comments().data(), this->leading_comments().length(), + this->leading_comments().data(), static_cast(this->leading_comments().length()), ::google::protobuf::internal::WireFormat::PARSE, "google.protobuf.SourceCodeInfo.Location.leading_comments"); } else { @@ -14465,11 +14672,11 @@ bool SourceCodeInfo_Location::MergePartialFromCodedStream( // optional string trailing_comments = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(34u)) { + static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_trailing_comments())); ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->trailing_comments().data(), this->trailing_comments().length(), + this->trailing_comments().data(), static_cast(this->trailing_comments().length()), ::google::protobuf::internal::WireFormat::PARSE, "google.protobuf.SourceCodeInfo.Location.trailing_comments"); } else { @@ -14481,12 +14688,12 @@ bool SourceCodeInfo_Location::MergePartialFromCodedStream( // repeated string leading_detached_comments = 6; case 6: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(50u)) { + static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->add_leading_detached_comments())); ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( this->leading_detached_comments(this->leading_detached_comments_size() - 1).data(), - this->leading_detached_comments(this->leading_detached_comments_size() - 1).length(), + static_cast(this->leading_detached_comments(this->leading_detached_comments_size() - 1).length()), ::google::protobuf::internal::WireFormat::PARSE, "google.protobuf.SourceCodeInfo.Location.leading_detached_comments"); } else { @@ -14497,13 +14704,11 @@ bool SourceCodeInfo_Location::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::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -14526,7 +14731,8 @@ void SourceCodeInfo_Location::SerializeWithCachedSizes( // repeated int32 path = 1 [packed = true]; if (this->path_size() > 0) { ::google::protobuf::internal::WireFormatLite::WriteTag(1, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); - output->WriteVarint32(_path_cached_byte_size_); + output->WriteVarint32(static_cast< ::google::protobuf::uint32>( + _path_cached_byte_size_)); } for (int i = 0, n = this->path_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag( @@ -14536,7 +14742,8 @@ void SourceCodeInfo_Location::SerializeWithCachedSizes( // repeated int32 span = 2 [packed = true]; if (this->span_size() > 0) { ::google::protobuf::internal::WireFormatLite::WriteTag(2, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); - output->WriteVarint32(_span_cached_byte_size_); + output->WriteVarint32(static_cast< ::google::protobuf::uint32>( + _span_cached_byte_size_)); } for (int i = 0, n = this->span_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag( @@ -14547,7 +14754,7 @@ void SourceCodeInfo_Location::SerializeWithCachedSizes( // optional string leading_comments = 3; if (cached_has_bits & 0x00000001u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->leading_comments().data(), this->leading_comments().length(), + this->leading_comments().data(), static_cast(this->leading_comments().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.SourceCodeInfo.Location.leading_comments"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( @@ -14557,7 +14764,7 @@ void SourceCodeInfo_Location::SerializeWithCachedSizes( // optional string trailing_comments = 4; if (cached_has_bits & 0x00000002u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->trailing_comments().data(), this->trailing_comments().length(), + this->trailing_comments().data(), static_cast(this->trailing_comments().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.SourceCodeInfo.Location.trailing_comments"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( @@ -14567,7 +14774,7 @@ void SourceCodeInfo_Location::SerializeWithCachedSizes( // repeated string leading_detached_comments = 6; for (int i = 0, n = this->leading_detached_comments_size(); i < n; i++) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->leading_detached_comments(i).data(), this->leading_detached_comments(i).length(), + this->leading_detached_comments(i).data(), static_cast(this->leading_detached_comments(i).length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.SourceCodeInfo.Location.leading_detached_comments"); ::google::protobuf::internal::WireFormatLite::WriteString( @@ -14576,7 +14783,7 @@ void SourceCodeInfo_Location::SerializeWithCachedSizes( if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); + _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.SourceCodeInfo.Location) } @@ -14595,7 +14802,8 @@ ::google::protobuf::uint8* SourceCodeInfo_Location::InternalSerializeWithCachedS ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, target); target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( - _path_cached_byte_size_, target); + static_cast< ::google::protobuf::uint32>( + _path_cached_byte_size_), target); target = ::google::protobuf::internal::WireFormatLite:: WriteInt32NoTagToArray(this->path_, target); } @@ -14607,7 +14815,8 @@ ::google::protobuf::uint8* SourceCodeInfo_Location::InternalSerializeWithCachedS ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, target); target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( - _span_cached_byte_size_, target); + static_cast< ::google::protobuf::uint32>( + _span_cached_byte_size_), target); target = ::google::protobuf::internal::WireFormatLite:: WriteInt32NoTagToArray(this->span_, target); } @@ -14616,7 +14825,7 @@ ::google::protobuf::uint8* SourceCodeInfo_Location::InternalSerializeWithCachedS // optional string leading_comments = 3; if (cached_has_bits & 0x00000001u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->leading_comments().data(), this->leading_comments().length(), + this->leading_comments().data(), static_cast(this->leading_comments().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.SourceCodeInfo.Location.leading_comments"); target = @@ -14627,7 +14836,7 @@ ::google::protobuf::uint8* SourceCodeInfo_Location::InternalSerializeWithCachedS // optional string trailing_comments = 4; if (cached_has_bits & 0x00000002u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->trailing_comments().data(), this->trailing_comments().length(), + this->trailing_comments().data(), static_cast(this->trailing_comments().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.SourceCodeInfo.Location.trailing_comments"); target = @@ -14638,7 +14847,7 @@ ::google::protobuf::uint8* SourceCodeInfo_Location::InternalSerializeWithCachedS // repeated string leading_detached_comments = 6; for (int i = 0, n = this->leading_detached_comments_size(); i < n; i++) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->leading_detached_comments(i).data(), this->leading_detached_comments(i).length(), + this->leading_detached_comments(i).data(), static_cast(this->leading_detached_comments(i).length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.SourceCodeInfo.Location.leading_detached_comments"); target = ::google::protobuf::internal::WireFormatLite:: @@ -14647,7 +14856,7 @@ ::google::protobuf::uint8* SourceCodeInfo_Location::InternalSerializeWithCachedS if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); + _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.SourceCodeInfo.Location) return target; @@ -14660,7 +14869,7 @@ size_t SourceCodeInfo_Location::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); + _internal_metadata_.unknown_fields()); } // repeated int32 path = 1 [packed = true]; { @@ -14668,7 +14877,8 @@ size_t SourceCodeInfo_Location::ByteSizeLong() const { Int32Size(this->path_); if (data_size > 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size(data_size); + ::google::protobuf::internal::WireFormatLite::Int32Size( + static_cast< ::google::protobuf::int32>(data_size)); } int cached_size = ::google::protobuf::internal::ToCachedSize(data_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); @@ -14683,7 +14893,8 @@ size_t SourceCodeInfo_Location::ByteSizeLong() const { Int32Size(this->span_); if (data_size > 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size(data_size); + ::google::protobuf::internal::WireFormatLite::Int32Size( + static_cast< ::google::protobuf::int32>(data_size)); } int cached_size = ::google::protobuf::internal::ToCachedSize(data_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); @@ -14784,14 +14995,15 @@ void SourceCodeInfo_Location::Swap(SourceCodeInfo_Location* other) { InternalSwap(other); } void SourceCodeInfo_Location::InternalSwap(SourceCodeInfo_Location* other) { + using std::swap; path_.InternalSwap(&other->path_); span_.InternalSwap(&other->span_); leading_detached_comments_.InternalSwap(&other->leading_detached_comments_); leading_comments_.Swap(&other->leading_comments_); trailing_comments_.Swap(&other->trailing_comments_); - std::swap(_has_bits_[0], other->_has_bits_[0]); + swap(_has_bits_[0], other->_has_bits_[0]); _internal_metadata_.Swap(&other->_internal_metadata_); - std::swap(_cached_size_, other->_cached_size_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata SourceCodeInfo_Location::GetMetadata() const { @@ -15120,6 +15332,10 @@ SourceCodeInfo* SourceCodeInfo::New(::google::protobuf::Arena* arena) const { void SourceCodeInfo::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.SourceCodeInfo) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + location_.Clear(); _has_bits_.Clear(); _internal_metadata_.Clear(); @@ -15138,7 +15354,7 @@ bool SourceCodeInfo::MergePartialFromCodedStream( // repeated .google.protobuf.SourceCodeInfo.Location location = 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::ReadMessageNoVirtual( input, add_location())); } else { @@ -15149,13 +15365,11 @@ bool SourceCodeInfo::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::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -15176,14 +15390,15 @@ void SourceCodeInfo::SerializeWithCachedSizes( (void) cached_has_bits; // repeated .google.protobuf.SourceCodeInfo.Location location = 1; - for (unsigned int i = 0, n = this->location_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->location_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 1, this->location(i), output); + 1, this->location(static_cast(i)), output); } if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); + _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.SourceCodeInfo) } @@ -15196,15 +15411,16 @@ ::google::protobuf::uint8* SourceCodeInfo::InternalSerializeWithCachedSizesToArr (void) cached_has_bits; // repeated .google.protobuf.SourceCodeInfo.Location location = 1; - for (unsigned int i = 0, n = this->location_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->location_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageNoVirtualToArray( - 1, this->location(i), deterministic, target); + 1, this->location(static_cast(i)), deterministic, target); } if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); + _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.SourceCodeInfo) return target; @@ -15217,16 +15433,16 @@ size_t SourceCodeInfo::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); + _internal_metadata_.unknown_fields()); } // repeated .google.protobuf.SourceCodeInfo.Location location = 1; { - unsigned int count = this->location_size(); + unsigned int count = static_cast(this->location_size()); total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->location(i)); + this->location(static_cast(i))); } } @@ -15285,10 +15501,11 @@ void SourceCodeInfo::Swap(SourceCodeInfo* other) { InternalSwap(other); } void SourceCodeInfo::InternalSwap(SourceCodeInfo* other) { + using std::swap; location_.InternalSwap(&other->location_); - std::swap(_has_bits_[0], other->_has_bits_[0]); + swap(_has_bits_[0], other->_has_bits_[0]); _internal_metadata_.Swap(&other->_internal_metadata_); - std::swap(_cached_size_, other->_cached_size_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata SourceCodeInfo::GetMetadata() const { @@ -15360,16 +15577,17 @@ GeneratedCodeInfo_Annotation::GeneratedCodeInfo_Annotation(const GeneratedCodeIn source_file_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.source_file_); } ::memcpy(&begin_, &from.begin_, - reinterpret_cast(&end_) - - reinterpret_cast(&begin_) + sizeof(end_)); + static_cast(reinterpret_cast(&end_) - + reinterpret_cast(&begin_)) + sizeof(end_)); // @@protoc_insertion_point(copy_constructor:google.protobuf.GeneratedCodeInfo.Annotation) } void GeneratedCodeInfo_Annotation::SharedCtor() { _cached_size_ = 0; source_file_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - ::memset(&begin_, 0, reinterpret_cast(&end_) - - reinterpret_cast(&begin_) + sizeof(end_)); + ::memset(&begin_, 0, static_cast( + reinterpret_cast(&end_) - + reinterpret_cast(&begin_)) + sizeof(end_)); } GeneratedCodeInfo_Annotation::~GeneratedCodeInfo_Annotation() { @@ -15406,14 +15624,20 @@ GeneratedCodeInfo_Annotation* GeneratedCodeInfo_Annotation::New(::google::protob void GeneratedCodeInfo_Annotation::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.GeneratedCodeInfo.Annotation) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + path_.Clear(); if (has_source_file()) { GOOGLE_DCHECK(!source_file_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); (*source_file_.UnsafeRawStringPointer())->clear(); } - if (_has_bits_[0 / 32] & 6u) { - ::memset(&begin_, 0, reinterpret_cast(&end_) - - reinterpret_cast(&begin_) + sizeof(end_)); + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 6u) { + ::memset(&begin_, 0, static_cast( + reinterpret_cast(&end_) - + reinterpret_cast(&begin_)) + sizeof(end_)); } _has_bits_.Clear(); _internal_metadata_.Clear(); @@ -15432,12 +15656,13 @@ bool GeneratedCodeInfo_Annotation::MergePartialFromCodedStream( // repeated int32 path = 1 [packed = true]; 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::ReadPackedPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, this->mutable_path()))); - } else if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(8u)) { + } else if ( + static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( 1, 10u, input, this->mutable_path()))); @@ -15450,11 +15675,11 @@ bool GeneratedCodeInfo_Annotation::MergePartialFromCodedStream( // optional string source_file = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(18u)) { + static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_source_file())); ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->source_file().data(), this->source_file().length(), + this->source_file().data(), static_cast(this->source_file().length()), ::google::protobuf::internal::WireFormat::PARSE, "google.protobuf.GeneratedCodeInfo.Annotation.source_file"); } else { @@ -15466,7 +15691,7 @@ bool GeneratedCodeInfo_Annotation::MergePartialFromCodedStream( // optional int32 begin = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(24u)) { + static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) { set_has_begin(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( @@ -15480,7 +15705,7 @@ bool GeneratedCodeInfo_Annotation::MergePartialFromCodedStream( // optional int32 end = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(32u)) { + static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) { set_has_end(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( @@ -15493,13 +15718,11 @@ bool GeneratedCodeInfo_Annotation::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::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -15522,7 +15745,8 @@ void GeneratedCodeInfo_Annotation::SerializeWithCachedSizes( // repeated int32 path = 1 [packed = true]; if (this->path_size() > 0) { ::google::protobuf::internal::WireFormatLite::WriteTag(1, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); - output->WriteVarint32(_path_cached_byte_size_); + output->WriteVarint32(static_cast< ::google::protobuf::uint32>( + _path_cached_byte_size_)); } for (int i = 0, n = this->path_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag( @@ -15533,7 +15757,7 @@ void GeneratedCodeInfo_Annotation::SerializeWithCachedSizes( // optional string source_file = 2; if (cached_has_bits & 0x00000001u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->source_file().data(), this->source_file().length(), + this->source_file().data(), static_cast(this->source_file().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.GeneratedCodeInfo.Annotation.source_file"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( @@ -15552,7 +15776,7 @@ void GeneratedCodeInfo_Annotation::SerializeWithCachedSizes( if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); + _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.GeneratedCodeInfo.Annotation) } @@ -15571,7 +15795,8 @@ ::google::protobuf::uint8* GeneratedCodeInfo_Annotation::InternalSerializeWithCa ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, target); target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( - _path_cached_byte_size_, target); + static_cast< ::google::protobuf::uint32>( + _path_cached_byte_size_), target); target = ::google::protobuf::internal::WireFormatLite:: WriteInt32NoTagToArray(this->path_, target); } @@ -15580,7 +15805,7 @@ ::google::protobuf::uint8* GeneratedCodeInfo_Annotation::InternalSerializeWithCa // optional string source_file = 2; if (cached_has_bits & 0x00000001u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->source_file().data(), this->source_file().length(), + this->source_file().data(), static_cast(this->source_file().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.GeneratedCodeInfo.Annotation.source_file"); target = @@ -15600,7 +15825,7 @@ ::google::protobuf::uint8* GeneratedCodeInfo_Annotation::InternalSerializeWithCa if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); + _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.GeneratedCodeInfo.Annotation) return target; @@ -15613,7 +15838,7 @@ size_t GeneratedCodeInfo_Annotation::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); + _internal_metadata_.unknown_fields()); } // repeated int32 path = 1 [packed = true]; { @@ -15621,7 +15846,8 @@ size_t GeneratedCodeInfo_Annotation::ByteSizeLong() const { Int32Size(this->path_); if (data_size > 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size(data_size); + ::google::protobuf::internal::WireFormatLite::Int32Size( + static_cast< ::google::protobuf::int32>(data_size)); } int cached_size = ::google::protobuf::internal::ToCachedSize(data_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); @@ -15722,13 +15948,14 @@ void GeneratedCodeInfo_Annotation::Swap(GeneratedCodeInfo_Annotation* other) { InternalSwap(other); } void GeneratedCodeInfo_Annotation::InternalSwap(GeneratedCodeInfo_Annotation* other) { + using std::swap; path_.InternalSwap(&other->path_); source_file_.Swap(&other->source_file_); - std::swap(begin_, other->begin_); - std::swap(end_, other->end_); - std::swap(_has_bits_[0], other->_has_bits_[0]); + swap(begin_, other->begin_); + swap(end_, other->end_); + swap(_has_bits_[0], other->_has_bits_[0]); _internal_metadata_.Swap(&other->_internal_metadata_); - std::swap(_cached_size_, other->_cached_size_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata GeneratedCodeInfo_Annotation::GetMetadata() const { @@ -15943,6 +16170,10 @@ GeneratedCodeInfo* GeneratedCodeInfo::New(::google::protobuf::Arena* arena) cons void GeneratedCodeInfo::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.GeneratedCodeInfo) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + annotation_.Clear(); _has_bits_.Clear(); _internal_metadata_.Clear(); @@ -15961,7 +16192,7 @@ bool GeneratedCodeInfo::MergePartialFromCodedStream( // repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 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::ReadMessageNoVirtual( input, add_annotation())); } else { @@ -15972,13 +16203,11 @@ bool GeneratedCodeInfo::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::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -15999,14 +16228,15 @@ void GeneratedCodeInfo::SerializeWithCachedSizes( (void) cached_has_bits; // repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1; - for (unsigned int i = 0, n = this->annotation_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->annotation_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 1, this->annotation(i), output); + 1, this->annotation(static_cast(i)), output); } if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); + _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.GeneratedCodeInfo) } @@ -16019,15 +16249,16 @@ ::google::protobuf::uint8* GeneratedCodeInfo::InternalSerializeWithCachedSizesTo (void) cached_has_bits; // repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1; - for (unsigned int i = 0, n = this->annotation_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->annotation_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageNoVirtualToArray( - 1, this->annotation(i), deterministic, target); + 1, this->annotation(static_cast(i)), deterministic, target); } if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); + _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.GeneratedCodeInfo) return target; @@ -16040,16 +16271,16 @@ size_t GeneratedCodeInfo::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); + _internal_metadata_.unknown_fields()); } // repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1; { - unsigned int count = this->annotation_size(); + unsigned int count = static_cast(this->annotation_size()); total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->annotation(i)); + this->annotation(static_cast(i))); } } @@ -16108,10 +16339,11 @@ void GeneratedCodeInfo::Swap(GeneratedCodeInfo* other) { InternalSwap(other); } void GeneratedCodeInfo::InternalSwap(GeneratedCodeInfo* other) { + using std::swap; annotation_.InternalSwap(&other->annotation_); - std::swap(_has_bits_[0], other->_has_bits_[0]); + swap(_has_bits_[0], other->_has_bits_[0]); _internal_metadata_.Swap(&other->_internal_metadata_); - std::swap(_cached_size_, other->_cached_size_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata GeneratedCodeInfo::GetMetadata() const { diff --git a/plugin/compiler/google/protobuf/descriptor.pb.h b/plugin/compiler/google/protobuf/descriptor.pb.h index 43af056..aa8d8b4 100644 --- a/plugin/compiler/google/protobuf/descriptor.pb.h +++ b/plugin/compiler/google/protobuf/descriptor.pb.h @@ -8,12 +8,12 @@ #include -#if GOOGLE_PROTOBUF_VERSION < 3003000 +#if GOOGLE_PROTOBUF_VERSION < 3004000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3003002 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3004000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. @@ -121,8 +121,9 @@ struct TableStruct { static const ::google::protobuf::internal::AuxillaryParseTableField aux[]; static const ::google::protobuf::internal::ParseTable schema[]; static const ::google::protobuf::uint32 offsets[]; + static const ::google::protobuf::internal::FieldMetadata field_metadata[]; + static const ::google::protobuf::internal::SerializationTable serialization_table[]; static void InitDefaultsImpl(); - static void Shutdown(); }; void AddDescriptors(); void InitDefaults(); @@ -276,11 +277,24 @@ class FileDescriptorSet : public ::google::protobuf::Message /* @@protoc_inserti CopyFrom(from); return *this; } + #if LANG_CXX11 + FileDescriptorSet(FileDescriptorSet&& from) noexcept + : FileDescriptorSet() { + *this = ::std::move(from); + } + inline FileDescriptorSet& operator=(FileDescriptorSet&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } @@ -296,6 +310,9 @@ class FileDescriptorSet : public ::google::protobuf::Message /* @@protoc_inserti 0; void Swap(FileDescriptorSet* other); + friend void swap(FileDescriptorSet& a, FileDescriptorSet& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -371,11 +388,24 @@ class FileDescriptorProto : public ::google::protobuf::Message /* @@protoc_inser CopyFrom(from); return *this; } + #if LANG_CXX11 + FileDescriptorProto(FileDescriptorProto&& from) noexcept + : FileDescriptorProto() { + *this = ::std::move(from); + } + inline FileDescriptorProto& operator=(FileDescriptorProto&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } @@ -391,6 +421,9 @@ class FileDescriptorProto : public ::google::protobuf::Message /* @@protoc_inser 1; void Swap(FileDescriptorProto* other); + friend void swap(FileDescriptorProto& a, FileDescriptorProto& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -632,11 +665,24 @@ class DescriptorProto_ExtensionRange : public ::google::protobuf::Message /* @@p CopyFrom(from); return *this; } + #if LANG_CXX11 + DescriptorProto_ExtensionRange(DescriptorProto_ExtensionRange&& from) noexcept + : DescriptorProto_ExtensionRange() { + *this = ::std::move(from); + } + inline DescriptorProto_ExtensionRange& operator=(DescriptorProto_ExtensionRange&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } @@ -652,6 +698,9 @@ class DescriptorProto_ExtensionRange : public ::google::protobuf::Message /* @@p 2; void Swap(DescriptorProto_ExtensionRange* other); + friend void swap(DescriptorProto_ExtensionRange& a, DescriptorProto_ExtensionRange& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -734,11 +783,24 @@ class DescriptorProto_ReservedRange : public ::google::protobuf::Message /* @@pr CopyFrom(from); return *this; } + #if LANG_CXX11 + DescriptorProto_ReservedRange(DescriptorProto_ReservedRange&& from) noexcept + : DescriptorProto_ReservedRange() { + *this = ::std::move(from); + } + inline DescriptorProto_ReservedRange& operator=(DescriptorProto_ReservedRange&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } @@ -754,6 +816,9 @@ class DescriptorProto_ReservedRange : public ::google::protobuf::Message /* @@pr 3; void Swap(DescriptorProto_ReservedRange* other); + friend void swap(DescriptorProto_ReservedRange& a, DescriptorProto_ReservedRange& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -836,11 +901,24 @@ class DescriptorProto : public ::google::protobuf::Message /* @@protoc_insertion CopyFrom(from); return *this; } + #if LANG_CXX11 + DescriptorProto(DescriptorProto&& from) noexcept + : DescriptorProto() { + *this = ::std::move(from); + } + inline DescriptorProto& operator=(DescriptorProto&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } @@ -856,6 +934,9 @@ class DescriptorProto : public ::google::protobuf::Message /* @@protoc_insertion 4; void Swap(DescriptorProto* other); + friend void swap(DescriptorProto& a, DescriptorProto& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -1065,11 +1146,24 @@ class FieldDescriptorProto : public ::google::protobuf::Message /* @@protoc_inse CopyFrom(from); return *this; } + #if LANG_CXX11 + FieldDescriptorProto(FieldDescriptorProto&& from) noexcept + : FieldDescriptorProto() { + *this = ::std::move(from); + } + inline FieldDescriptorProto& operator=(FieldDescriptorProto&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } @@ -1085,6 +1179,9 @@ class FieldDescriptorProto : public ::google::protobuf::Message /* @@protoc_inse 5; void Swap(FieldDescriptorProto* other); + friend void swap(FieldDescriptorProto& a, FieldDescriptorProto& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -1375,11 +1472,24 @@ class OneofDescriptorProto : public ::google::protobuf::Message /* @@protoc_inse CopyFrom(from); return *this; } + #if LANG_CXX11 + OneofDescriptorProto(OneofDescriptorProto&& from) noexcept + : OneofDescriptorProto() { + *this = ::std::move(from); + } + inline OneofDescriptorProto& operator=(OneofDescriptorProto&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } @@ -1395,6 +1505,9 @@ class OneofDescriptorProto : public ::google::protobuf::Message /* @@protoc_inse 6; void Swap(OneofDescriptorProto* other); + friend void swap(OneofDescriptorProto& a, OneofDescriptorProto& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -1487,11 +1600,24 @@ class EnumDescriptorProto : public ::google::protobuf::Message /* @@protoc_inser CopyFrom(from); return *this; } + #if LANG_CXX11 + EnumDescriptorProto(EnumDescriptorProto&& from) noexcept + : EnumDescriptorProto() { + *this = ::std::move(from); + } + inline EnumDescriptorProto& operator=(EnumDescriptorProto&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } @@ -1507,6 +1633,9 @@ class EnumDescriptorProto : public ::google::protobuf::Message /* @@protoc_inser 7; void Swap(EnumDescriptorProto* other); + friend void swap(EnumDescriptorProto& a, EnumDescriptorProto& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -1612,11 +1741,24 @@ class EnumValueDescriptorProto : public ::google::protobuf::Message /* @@protoc_ CopyFrom(from); return *this; } + #if LANG_CXX11 + EnumValueDescriptorProto(EnumValueDescriptorProto&& from) noexcept + : EnumValueDescriptorProto() { + *this = ::std::move(from); + } + inline EnumValueDescriptorProto& operator=(EnumValueDescriptorProto&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } @@ -1632,6 +1774,9 @@ class EnumValueDescriptorProto : public ::google::protobuf::Message /* @@protoc_ 8; void Swap(EnumValueDescriptorProto* other); + friend void swap(EnumValueDescriptorProto& a, EnumValueDescriptorProto& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -1734,11 +1879,24 @@ class ServiceDescriptorProto : public ::google::protobuf::Message /* @@protoc_in CopyFrom(from); return *this; } + #if LANG_CXX11 + ServiceDescriptorProto(ServiceDescriptorProto&& from) noexcept + : ServiceDescriptorProto() { + *this = ::std::move(from); + } + inline ServiceDescriptorProto& operator=(ServiceDescriptorProto&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } @@ -1754,6 +1912,9 @@ class ServiceDescriptorProto : public ::google::protobuf::Message /* @@protoc_in 9; void Swap(ServiceDescriptorProto* other); + friend void swap(ServiceDescriptorProto& a, ServiceDescriptorProto& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -1859,11 +2020,24 @@ class MethodDescriptorProto : public ::google::protobuf::Message /* @@protoc_ins CopyFrom(from); return *this; } + #if LANG_CXX11 + MethodDescriptorProto(MethodDescriptorProto&& from) noexcept + : MethodDescriptorProto() { + *this = ::std::move(from); + } + inline MethodDescriptorProto& operator=(MethodDescriptorProto&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } @@ -1879,6 +2053,9 @@ class MethodDescriptorProto : public ::google::protobuf::Message /* @@protoc_ins 10; void Swap(MethodDescriptorProto* other); + friend void swap(MethodDescriptorProto& a, MethodDescriptorProto& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -2027,11 +2204,24 @@ class FileOptions : public ::google::protobuf::Message /* @@protoc_insertion_poi CopyFrom(from); return *this; } + #if LANG_CXX11 + FileOptions(FileOptions&& from) noexcept + : FileOptions() { + *this = ::std::move(from); + } + inline FileOptions& operator=(FileOptions&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } @@ -2047,6 +2237,9 @@ class FileOptions : public ::google::protobuf::Message /* @@protoc_insertion_poi 11; void Swap(FileOptions* other); + friend void swap(FileOptions& a, FileOptions& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -2369,11 +2562,24 @@ class MessageOptions : public ::google::protobuf::Message /* @@protoc_insertion_ CopyFrom(from); return *this; } + #if LANG_CXX11 + MessageOptions(MessageOptions&& from) noexcept + : MessageOptions() { + *this = ::std::move(from); + } + inline MessageOptions& operator=(MessageOptions&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } @@ -2389,6 +2595,9 @@ class MessageOptions : public ::google::protobuf::Message /* @@protoc_insertion_ 12; void Swap(MessageOptions* other); + friend void swap(MessageOptions& a, MessageOptions& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -2507,11 +2716,24 @@ class FieldOptions : public ::google::protobuf::Message /* @@protoc_insertion_po CopyFrom(from); return *this; } + #if LANG_CXX11 + FieldOptions(FieldOptions&& from) noexcept + : FieldOptions() { + *this = ::std::move(from); + } + inline FieldOptions& operator=(FieldOptions&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } @@ -2527,6 +2749,9 @@ class FieldOptions : public ::google::protobuf::Message /* @@protoc_insertion_po 13; void Swap(FieldOptions* other); + friend void swap(FieldOptions& a, FieldOptions& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -2721,11 +2946,24 @@ class OneofOptions : public ::google::protobuf::Message /* @@protoc_insertion_po CopyFrom(from); return *this; } + #if LANG_CXX11 + OneofOptions(OneofOptions&& from) noexcept + : OneofOptions() { + *this = ::std::move(from); + } + inline OneofOptions& operator=(OneofOptions&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } @@ -2741,6 +2979,9 @@ class OneofOptions : public ::google::protobuf::Message /* @@protoc_insertion_po 14; void Swap(OneofOptions* other); + friend void swap(OneofOptions& a, OneofOptions& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -2819,11 +3060,24 @@ class EnumOptions : public ::google::protobuf::Message /* @@protoc_insertion_poi CopyFrom(from); return *this; } + #if LANG_CXX11 + EnumOptions(EnumOptions&& from) noexcept + : EnumOptions() { + *this = ::std::move(from); + } + inline EnumOptions& operator=(EnumOptions&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } @@ -2839,6 +3093,9 @@ class EnumOptions : public ::google::protobuf::Message /* @@protoc_insertion_poi 15; void Swap(EnumOptions* other); + friend void swap(EnumOptions& a, EnumOptions& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -2937,11 +3194,24 @@ class EnumValueOptions : public ::google::protobuf::Message /* @@protoc_insertio CopyFrom(from); return *this; } + #if LANG_CXX11 + EnumValueOptions(EnumValueOptions&& from) noexcept + : EnumValueOptions() { + *this = ::std::move(from); + } + inline EnumValueOptions& operator=(EnumValueOptions&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } @@ -2957,6 +3227,9 @@ class EnumValueOptions : public ::google::protobuf::Message /* @@protoc_insertio 16; void Swap(EnumValueOptions* other); + friend void swap(EnumValueOptions& a, EnumValueOptions& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -3045,11 +3318,24 @@ class ServiceOptions : public ::google::protobuf::Message /* @@protoc_insertion_ CopyFrom(from); return *this; } + #if LANG_CXX11 + ServiceOptions(ServiceOptions&& from) noexcept + : ServiceOptions() { + *this = ::std::move(from); + } + inline ServiceOptions& operator=(ServiceOptions&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } @@ -3065,6 +3351,9 @@ class ServiceOptions : public ::google::protobuf::Message /* @@protoc_insertion_ 17; void Swap(ServiceOptions* other); + friend void swap(ServiceOptions& a, ServiceOptions& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -3153,11 +3442,24 @@ class MethodOptions : public ::google::protobuf::Message /* @@protoc_insertion_p CopyFrom(from); return *this; } + #if LANG_CXX11 + MethodOptions(MethodOptions&& from) noexcept + : MethodOptions() { + *this = ::std::move(from); + } + inline MethodOptions& operator=(MethodOptions&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } @@ -3173,6 +3475,9 @@ class MethodOptions : public ::google::protobuf::Message /* @@protoc_insertion_p 18; void Swap(MethodOptions* other); + friend void swap(MethodOptions& a, MethodOptions& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -3299,11 +3604,24 @@ class UninterpretedOption_NamePart : public ::google::protobuf::Message /* @@pro CopyFrom(from); return *this; } + #if LANG_CXX11 + UninterpretedOption_NamePart(UninterpretedOption_NamePart&& from) noexcept + : UninterpretedOption_NamePart() { + *this = ::std::move(from); + } + inline UninterpretedOption_NamePart& operator=(UninterpretedOption_NamePart&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } @@ -3319,6 +3637,9 @@ class UninterpretedOption_NamePart : public ::google::protobuf::Message /* @@pro 19; void Swap(UninterpretedOption_NamePart* other); + friend void swap(UninterpretedOption_NamePart& a, UninterpretedOption_NamePart& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -3412,11 +3733,24 @@ class UninterpretedOption : public ::google::protobuf::Message /* @@protoc_inser CopyFrom(from); return *this; } + #if LANG_CXX11 + UninterpretedOption(UninterpretedOption&& from) noexcept + : UninterpretedOption() { + *this = ::std::move(from); + } + inline UninterpretedOption& operator=(UninterpretedOption&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } @@ -3432,6 +3766,9 @@ class UninterpretedOption : public ::google::protobuf::Message /* @@protoc_inser 20; void Swap(UninterpretedOption* other); + friend void swap(UninterpretedOption& a, UninterpretedOption& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -3593,11 +3930,24 @@ class SourceCodeInfo_Location : public ::google::protobuf::Message /* @@protoc_i CopyFrom(from); return *this; } + #if LANG_CXX11 + SourceCodeInfo_Location(SourceCodeInfo_Location&& from) noexcept + : SourceCodeInfo_Location() { + *this = ::std::move(from); + } + inline SourceCodeInfo_Location& operator=(SourceCodeInfo_Location&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } @@ -3613,6 +3963,9 @@ class SourceCodeInfo_Location : public ::google::protobuf::Message /* @@protoc_i 21; void Swap(SourceCodeInfo_Location* other); + friend void swap(SourceCodeInfo_Location& a, SourceCodeInfo_Location& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -3762,11 +4115,24 @@ class SourceCodeInfo : public ::google::protobuf::Message /* @@protoc_insertion_ CopyFrom(from); return *this; } + #if LANG_CXX11 + SourceCodeInfo(SourceCodeInfo&& from) noexcept + : SourceCodeInfo() { + *this = ::std::move(from); + } + inline SourceCodeInfo& operator=(SourceCodeInfo&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } @@ -3782,6 +4148,9 @@ class SourceCodeInfo : public ::google::protobuf::Message /* @@protoc_insertion_ 22; void Swap(SourceCodeInfo* other); + friend void swap(SourceCodeInfo& a, SourceCodeInfo& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -3859,11 +4228,24 @@ class GeneratedCodeInfo_Annotation : public ::google::protobuf::Message /* @@pro CopyFrom(from); return *this; } + #if LANG_CXX11 + GeneratedCodeInfo_Annotation(GeneratedCodeInfo_Annotation&& from) noexcept + : GeneratedCodeInfo_Annotation() { + *this = ::std::move(from); + } + inline GeneratedCodeInfo_Annotation& operator=(GeneratedCodeInfo_Annotation&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } @@ -3879,6 +4261,9 @@ class GeneratedCodeInfo_Annotation : public ::google::protobuf::Message /* @@pro 23; void Swap(GeneratedCodeInfo_Annotation* other); + friend void swap(GeneratedCodeInfo_Annotation& a, GeneratedCodeInfo_Annotation& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -3993,11 +4378,24 @@ class GeneratedCodeInfo : public ::google::protobuf::Message /* @@protoc_inserti CopyFrom(from); return *this; } + #if LANG_CXX11 + GeneratedCodeInfo(GeneratedCodeInfo&& from) noexcept + : GeneratedCodeInfo() { + *this = ::std::move(from); + } + inline GeneratedCodeInfo& operator=(GeneratedCodeInfo&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } @@ -4013,6 +4411,9 @@ class GeneratedCodeInfo : public ::google::protobuf::Message /* @@protoc_inserti 24; void Swap(GeneratedCodeInfo* other); + friend void swap(GeneratedCodeInfo& a, GeneratedCodeInfo& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -4083,6 +4484,10 @@ class GeneratedCodeInfo : public ::google::protobuf::Message /* @@protoc_inserti // =================================================================== #if !PROTOBUF_INLINE_NOT_IN_HEADERS +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ // FileDescriptorSet // repeated .google.protobuf.FileDescriptorProto file = 1; @@ -4509,9 +4914,10 @@ inline void FileDescriptorProto::clear_options() { clear_has_options(); } inline const ::google::protobuf::FileOptions& FileDescriptorProto::options() const { + const ::google::protobuf::FileOptions* p = options_; // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.options) - return options_ != NULL ? *options_ - : *::google::protobuf::FileOptions::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::google::protobuf::_FileOptions_default_instance_); } inline ::google::protobuf::FileOptions* FileDescriptorProto::mutable_options() { set_has_options(); @@ -4554,9 +4960,10 @@ inline void FileDescriptorProto::clear_source_code_info() { clear_has_source_code_info(); } inline const ::google::protobuf::SourceCodeInfo& FileDescriptorProto::source_code_info() const { + const ::google::protobuf::SourceCodeInfo* p = source_code_info_; // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.source_code_info) - return source_code_info_ != NULL ? *source_code_info_ - : *::google::protobuf::SourceCodeInfo::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::google::protobuf::_SourceCodeInfo_default_instance_); } inline ::google::protobuf::SourceCodeInfo* FileDescriptorProto::mutable_source_code_info() { set_has_source_code_info(); @@ -5013,9 +5420,10 @@ inline void DescriptorProto::clear_options() { clear_has_options(); } inline const ::google::protobuf::MessageOptions& DescriptorProto::options() const { + const ::google::protobuf::MessageOptions* p = options_; // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.options) - return options_ != NULL ? *options_ - : *::google::protobuf::MessageOptions::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::google::protobuf::_MessageOptions_default_instance_); } inline ::google::protobuf::MessageOptions* DescriptorProto::mutable_options() { set_has_options(); @@ -5574,9 +5982,10 @@ inline void FieldDescriptorProto::clear_options() { clear_has_options(); } inline const ::google::protobuf::FieldOptions& FieldDescriptorProto::options() const { + const ::google::protobuf::FieldOptions* p = options_; // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.options) - return options_ != NULL ? *options_ - : *::google::protobuf::FieldOptions::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::google::protobuf::_FieldOptions_default_instance_); } inline ::google::protobuf::FieldOptions* FieldDescriptorProto::mutable_options() { set_has_options(); @@ -5686,9 +6095,10 @@ inline void OneofDescriptorProto::clear_options() { clear_has_options(); } inline const ::google::protobuf::OneofOptions& OneofDescriptorProto::options() const { + const ::google::protobuf::OneofOptions* p = options_; // @@protoc_insertion_point(field_get:google.protobuf.OneofDescriptorProto.options) - return options_ != NULL ? *options_ - : *::google::protobuf::OneofOptions::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::google::protobuf::_OneofOptions_default_instance_); } inline ::google::protobuf::OneofOptions* OneofDescriptorProto::mutable_options() { set_has_options(); @@ -5828,9 +6238,10 @@ inline void EnumDescriptorProto::clear_options() { clear_has_options(); } inline const ::google::protobuf::EnumOptions& EnumDescriptorProto::options() const { + const ::google::protobuf::EnumOptions* p = options_; // @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.options) - return options_ != NULL ? *options_ - : *::google::protobuf::EnumOptions::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::google::protobuf::_EnumOptions_default_instance_); } inline ::google::protobuf::EnumOptions* EnumDescriptorProto::mutable_options() { set_has_options(); @@ -5964,9 +6375,10 @@ inline void EnumValueDescriptorProto::clear_options() { clear_has_options(); } inline const ::google::protobuf::EnumValueOptions& EnumValueDescriptorProto::options() const { + const ::google::protobuf::EnumValueOptions* p = options_; // @@protoc_insertion_point(field_get:google.protobuf.EnumValueDescriptorProto.options) - return options_ != NULL ? *options_ - : *::google::protobuf::EnumValueOptions::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::google::protobuf::_EnumValueOptions_default_instance_); } inline ::google::protobuf::EnumValueOptions* EnumValueDescriptorProto::mutable_options() { set_has_options(); @@ -6106,9 +6518,10 @@ inline void ServiceDescriptorProto::clear_options() { clear_has_options(); } inline const ::google::protobuf::ServiceOptions& ServiceDescriptorProto::options() const { + const ::google::protobuf::ServiceOptions* p = options_; // @@protoc_insertion_point(field_get:google.protobuf.ServiceDescriptorProto.options) - return options_ != NULL ? *options_ - : *::google::protobuf::ServiceOptions::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::google::protobuf::_ServiceOptions_default_instance_); } inline ::google::protobuf::ServiceOptions* ServiceDescriptorProto::mutable_options() { set_has_options(); @@ -6344,9 +6757,10 @@ inline void MethodDescriptorProto::clear_options() { clear_has_options(); } inline const ::google::protobuf::MethodOptions& MethodDescriptorProto::options() const { + const ::google::protobuf::MethodOptions* p = options_; // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.options) - return options_ != NULL ? *options_ - : *::google::protobuf::MethodOptions::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::google::protobuf::_MethodOptions_default_instance_); } inline ::google::protobuf::MethodOptions* MethodDescriptorProto::mutable_options() { set_has_options(); @@ -8597,6 +9011,9 @@ GeneratedCodeInfo::annotation() const { return annotation_; } +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS // ------------------------------------------------------------------- @@ -8653,7 +9070,6 @@ GeneratedCodeInfo::annotation() const { } // namespace protobuf } // namespace google -#ifndef SWIG namespace google { namespace protobuf { @@ -8690,7 +9106,6 @@ inline const EnumDescriptor* GetEnumDescriptor< ::google::protobuf::MethodOption } // namespace protobuf } // namespace google -#endif // SWIG // @@protoc_insertion_point(global_scope) diff --git a/plugin/compiler/google/protobuf/swift-descriptor.pb.cc b/plugin/compiler/google/protobuf/swift-descriptor.pb.cc index 17e87b8..859089f 100644 --- a/plugin/compiler/google/protobuf/swift-descriptor.pb.cc +++ b/plugin/compiler/google/protobuf/swift-descriptor.pb.cc @@ -19,13 +19,25 @@ namespace google { namespace protobuf { -class SwiftFileOptionsDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class SwiftFileOptionsDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _SwiftFileOptions_default_instance_; -class SwiftMessageOptionsDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class SwiftMessageOptionsDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _SwiftMessageOptions_default_instance_; -class SwiftFieldOptionsDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class SwiftFieldOptionsDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _SwiftFieldOptions_default_instance_; -class SwiftEnumOptionsDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class SwiftEnumOptionsDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _SwiftEnumOptions_default_instance_; namespace protobuf_google_2fprotobuf_2fswift_2ddescriptor_2eproto { @@ -39,23 +51,23 @@ const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[2]; } // 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 }, - { NULL, NULL, 0, -1, -1, false }, - { NULL, NULL, 0, -1, -1, false }, - { NULL, NULL, 0, -1, -1, false }, + TableStruct::schema[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, + { 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) = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SwiftFileOptions, _has_bits_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SwiftFileOptions, _internal_metadata_), ~0u, // no _extensions_ @@ -107,8 +119,7 @@ const ::google::protobuf::uint32 TableStruct::offsets[] = { 1, 2, }; - -static const ::google::protobuf::internal::MigrationSchema schemas[] = { +static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { { 0, 11, sizeof(SwiftFileOptions)}, { 17, 25, sizeof(SwiftMessageOptions)}, { 28, 36, sizeof(SwiftFieldOptions)}, @@ -144,28 +155,20 @@ void protobuf_RegisterTypes(const ::std::string&) { } } // namespace - -void TableStruct::Shutdown() { - _SwiftFileOptions_default_instance_.Shutdown(); - delete file_level_metadata[0].reflection; - _SwiftMessageOptions_default_instance_.Shutdown(); - delete file_level_metadata[1].reflection; - _SwiftFieldOptions_default_instance_.Shutdown(); - delete file_level_metadata[2].reflection; - _SwiftEnumOptions_default_instance_.Shutdown(); - delete file_level_metadata[3].reflection; -} - void TableStruct::InitDefaultsImpl() { GOOGLE_PROTOBUF_VERIFY_VERSION; ::google::protobuf::internal::InitProtobufDefaults(); ::google::protobuf::protobuf_google_2fprotobuf_2fdescriptor_2eproto::InitDefaults(); - _SwiftFileOptions_default_instance_.DefaultConstruct(); - _SwiftMessageOptions_default_instance_.DefaultConstruct(); - _SwiftFieldOptions_default_instance_.DefaultConstruct(); - _SwiftEnumOptions_default_instance_.DefaultConstruct(); - ::google::protobuf::internal::ExtensionSet::RegisterMessageExtension( + _SwiftFileOptions_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_SwiftFileOptions_default_instance_);_SwiftMessageOptions_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_SwiftMessageOptions_default_instance_);_SwiftFieldOptions_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_SwiftFieldOptions_default_instance_);_SwiftEnumOptions_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_SwiftEnumOptions_default_instance_);::google::protobuf::internal::ExtensionSet::RegisterMessageExtension( ::google::protobuf::FileOptions::internal_default_instance(), 5092014, 11, false, false, ::google::protobuf::SwiftFileOptions::internal_default_instance()); @@ -187,9 +190,10 @@ void InitDefaults() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &TableStruct::InitDefaultsImpl); } +namespace { void AddDescriptorsImpl() { InitDefaults(); - static const char descriptor[] = { + static const char descriptor[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { "\n&google/protobuf/swift-descriptor.proto" "\022\017google.protobuf\032 google/protobuf/descr" "iptor.proto\"\204\002\n\020SwiftFileOptions\022\024\n\014clas" @@ -229,14 +233,14 @@ void AddDescriptorsImpl() { ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "google/protobuf/swift-descriptor.proto", &protobuf_RegisterTypes); ::google::protobuf::protobuf_google_2fprotobuf_2fdescriptor_2eproto::AddDescriptors(); - ::google::protobuf::internal::OnShutdown(&TableStruct::Shutdown); } +} // anonymous namespace void AddDescriptors() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl); } -// Force AddDescriptors() to be called at static initialization time. +// Force AddDescriptors() to be called at dynamic initialization time. struct StaticDescriptorInitializer { StaticDescriptorInitializer() { AddDescriptors(); @@ -304,16 +308,17 @@ SwiftFileOptions::SwiftFileOptions(const SwiftFileOptions& from) class_prefix_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.class_prefix_); } ::memcpy(&generate_struct_, &from.generate_struct_, - reinterpret_cast(&compile_for_framework_) - - reinterpret_cast(&generate_struct_) + sizeof(compile_for_framework_)); + static_cast(reinterpret_cast(&compile_for_framework_) - + reinterpret_cast(&generate_struct_)) + sizeof(compile_for_framework_)); // @@protoc_insertion_point(copy_constructor:google.protobuf.SwiftFileOptions) } void SwiftFileOptions::SharedCtor() { _cached_size_ = 0; class_prefix_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - ::memset(&generate_struct_, 0, reinterpret_cast(&generate_react_) - - reinterpret_cast(&generate_struct_) + sizeof(generate_react_)); + ::memset(&generate_struct_, 0, static_cast( + reinterpret_cast(&generate_react_) - + reinterpret_cast(&generate_struct_)) + sizeof(generate_react_)); entities_access_control_ = 1; compile_for_framework_ = true; } @@ -352,13 +357,19 @@ SwiftFileOptions* SwiftFileOptions::New(::google::protobuf::Arena* arena) const void SwiftFileOptions::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.SwiftFileOptions) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + if (has_class_prefix()) { GOOGLE_DCHECK(!class_prefix_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); (*class_prefix_.UnsafeRawStringPointer())->clear(); } - if (_has_bits_[0 / 32] & 62u) { - ::memset(&generate_struct_, 0, reinterpret_cast(&generate_react_) - - reinterpret_cast(&generate_struct_) + sizeof(generate_react_)); + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 62u) { + ::memset(&generate_struct_, 0, static_cast( + reinterpret_cast(&generate_react_) - + reinterpret_cast(&generate_struct_)) + sizeof(generate_react_)); entities_access_control_ = 1; compile_for_framework_ = true; } @@ -379,11 +390,11 @@ bool SwiftFileOptions::MergePartialFromCodedStream( // optional string class_prefix = 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->mutable_class_prefix())); ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->class_prefix().data(), this->class_prefix().length(), + this->class_prefix().data(), static_cast(this->class_prefix().length()), ::google::protobuf::internal::WireFormat::PARSE, "google.protobuf.SwiftFileOptions.class_prefix"); } else { @@ -395,7 +406,7 @@ bool SwiftFileOptions::MergePartialFromCodedStream( // optional .google.protobuf.AccessControl entities_access_control = 2 [default = PublicEntities]; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(16u)) { + static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( @@ -403,7 +414,8 @@ bool SwiftFileOptions::MergePartialFromCodedStream( if (::google::protobuf::AccessControl_IsValid(value)) { set_entities_access_control(static_cast< ::google::protobuf::AccessControl >(value)); } else { - mutable_unknown_fields()->AddVarint(2, value); + mutable_unknown_fields()->AddVarint( + 2, static_cast< ::google::protobuf::uint64>(value)); } } else { goto handle_unusual; @@ -414,7 +426,7 @@ bool SwiftFileOptions::MergePartialFromCodedStream( // optional bool compile_for_framework = 3 [default = true]; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(24u)) { + static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) { set_has_compile_for_framework(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -428,7 +440,7 @@ bool SwiftFileOptions::MergePartialFromCodedStream( // optional bool generate_struct = 4 [default = false]; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(32u)) { + static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) { set_has_generate_struct(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -442,7 +454,7 @@ bool SwiftFileOptions::MergePartialFromCodedStream( // optional bool generate_realm_objects = 5 [default = false]; case 5: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(40u)) { + static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) { set_has_generate_realm_objects(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -456,7 +468,7 @@ bool SwiftFileOptions::MergePartialFromCodedStream( // optional bool generate_react = 6 [default = false]; case 6: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(48u)) { + static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) { set_has_generate_react(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -469,13 +481,11 @@ bool SwiftFileOptions::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::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -499,7 +509,7 @@ void SwiftFileOptions::SerializeWithCachedSizes( // optional string class_prefix = 1; if (cached_has_bits & 0x00000001u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->class_prefix().data(), this->class_prefix().length(), + this->class_prefix().data(), static_cast(this->class_prefix().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.SwiftFileOptions.class_prefix"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( @@ -534,7 +544,7 @@ void SwiftFileOptions::SerializeWithCachedSizes( if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); + _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.SwiftFileOptions) } @@ -550,7 +560,7 @@ ::google::protobuf::uint8* SwiftFileOptions::InternalSerializeWithCachedSizesToA // optional string class_prefix = 1; if (cached_has_bits & 0x00000001u) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->class_prefix().data(), this->class_prefix().length(), + this->class_prefix().data(), static_cast(this->class_prefix().length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.SwiftFileOptions.class_prefix"); target = @@ -586,7 +596,7 @@ ::google::protobuf::uint8* SwiftFileOptions::InternalSerializeWithCachedSizesToA if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); + _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.SwiftFileOptions) return target; @@ -599,7 +609,7 @@ size_t SwiftFileOptions::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); + _internal_metadata_.unknown_fields()); } if (_has_bits_[0 / 32] & 63u) { // optional string class_prefix = 1; @@ -713,15 +723,16 @@ void SwiftFileOptions::Swap(SwiftFileOptions* other) { InternalSwap(other); } void SwiftFileOptions::InternalSwap(SwiftFileOptions* other) { + using std::swap; class_prefix_.Swap(&other->class_prefix_); - std::swap(generate_struct_, other->generate_struct_); - std::swap(generate_realm_objects_, other->generate_realm_objects_); - std::swap(generate_react_, other->generate_react_); - std::swap(entities_access_control_, other->entities_access_control_); - std::swap(compile_for_framework_, other->compile_for_framework_); - std::swap(_has_bits_[0], other->_has_bits_[0]); + swap(generate_struct_, other->generate_struct_); + swap(generate_realm_objects_, other->generate_realm_objects_); + swap(generate_react_, other->generate_react_); + swap(entities_access_control_, other->entities_access_control_); + swap(compile_for_framework_, other->compile_for_framework_); + swap(_has_bits_[0], other->_has_bits_[0]); _internal_metadata_.Swap(&other->_internal_metadata_); - std::swap(_cached_size_, other->_cached_size_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata SwiftFileOptions::GetMetadata() const { @@ -941,15 +952,16 @@ SwiftMessageOptions::SwiftMessageOptions(const SwiftMessageOptions& from) _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); ::memcpy(&generate_error_type_, &from.generate_error_type_, - reinterpret_cast(&generate_react_) - - reinterpret_cast(&generate_error_type_) + sizeof(generate_react_)); + static_cast(reinterpret_cast(&generate_react_) - + reinterpret_cast(&generate_error_type_)) + sizeof(generate_react_)); // @@protoc_insertion_point(copy_constructor:google.protobuf.SwiftMessageOptions) } void SwiftMessageOptions::SharedCtor() { _cached_size_ = 0; - ::memset(&generate_error_type_, 0, reinterpret_cast(&generate_react_) - - reinterpret_cast(&generate_error_type_) + sizeof(generate_react_)); + ::memset(&generate_error_type_, 0, static_cast( + reinterpret_cast(&generate_react_) - + reinterpret_cast(&generate_error_type_)) + sizeof(generate_react_)); } SwiftMessageOptions::~SwiftMessageOptions() { @@ -985,9 +997,15 @@ SwiftMessageOptions* SwiftMessageOptions::New(::google::protobuf::Arena* arena) void SwiftMessageOptions::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.SwiftMessageOptions) - if (_has_bits_[0 / 32] & 7u) { - ::memset(&generate_error_type_, 0, reinterpret_cast(&generate_react_) - - reinterpret_cast(&generate_error_type_) + sizeof(generate_react_)); + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 7u) { + ::memset(&generate_error_type_, 0, static_cast( + reinterpret_cast(&generate_react_) - + reinterpret_cast(&generate_error_type_)) + sizeof(generate_react_)); } _has_bits_.Clear(); _internal_metadata_.Clear(); @@ -1006,7 +1024,7 @@ bool SwiftMessageOptions::MergePartialFromCodedStream( // optional bool generate_error_type = 1 [default = false]; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(8u)) { + static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { set_has_generate_error_type(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -1020,7 +1038,7 @@ bool SwiftMessageOptions::MergePartialFromCodedStream( // optional bool generate_realm_object = 2 [default = false]; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(16u)) { + static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { set_has_generate_realm_object(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -1034,7 +1052,7 @@ bool SwiftMessageOptions::MergePartialFromCodedStream( // optional bool generate_react = 5 [default = false]; case 5: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(40u)) { + static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) { set_has_generate_react(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -1047,13 +1065,11 @@ bool SwiftMessageOptions::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::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -1091,7 +1107,7 @@ void SwiftMessageOptions::SerializeWithCachedSizes( if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); + _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.SwiftMessageOptions) } @@ -1121,7 +1137,7 @@ ::google::protobuf::uint8* SwiftMessageOptions::InternalSerializeWithCachedSizes if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); + _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.SwiftMessageOptions) return target; @@ -1134,7 +1150,7 @@ size_t SwiftMessageOptions::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); + _internal_metadata_.unknown_fields()); } if (_has_bits_[0 / 32] & 7u) { // optional bool generate_error_type = 1 [default = false]; @@ -1220,12 +1236,13 @@ void SwiftMessageOptions::Swap(SwiftMessageOptions* other) { InternalSwap(other); } void SwiftMessageOptions::InternalSwap(SwiftMessageOptions* other) { - std::swap(generate_error_type_, other->generate_error_type_); - std::swap(generate_realm_object_, other->generate_realm_object_); - std::swap(generate_react_, other->generate_react_); - std::swap(_has_bits_[0], other->_has_bits_[0]); + using std::swap; + swap(generate_error_type_, other->generate_error_type_); + swap(generate_realm_object_, other->generate_realm_object_); + swap(generate_react_, other->generate_react_); + swap(_has_bits_[0], other->_has_bits_[0]); _internal_metadata_.Swap(&other->_internal_metadata_); - std::swap(_cached_size_, other->_cached_size_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata SwiftMessageOptions::GetMetadata() const { @@ -1333,15 +1350,16 @@ SwiftFieldOptions::SwiftFieldOptions(const SwiftFieldOptions& from) _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); ::memcpy(&realm_indexed_propertie_, &from.realm_indexed_propertie_, - reinterpret_cast(&realm_override_propertie_) - - reinterpret_cast(&realm_indexed_propertie_) + sizeof(realm_override_propertie_)); + static_cast(reinterpret_cast(&realm_override_propertie_) - + reinterpret_cast(&realm_indexed_propertie_)) + sizeof(realm_override_propertie_)); // @@protoc_insertion_point(copy_constructor:google.protobuf.SwiftFieldOptions) } void SwiftFieldOptions::SharedCtor() { _cached_size_ = 0; - ::memset(&realm_indexed_propertie_, 0, reinterpret_cast(&realm_override_propertie_) - - reinterpret_cast(&realm_indexed_propertie_) + sizeof(realm_override_propertie_)); + ::memset(&realm_indexed_propertie_, 0, static_cast( + reinterpret_cast(&realm_override_propertie_) - + reinterpret_cast(&realm_indexed_propertie_)) + sizeof(realm_override_propertie_)); } SwiftFieldOptions::~SwiftFieldOptions() { @@ -1377,9 +1395,15 @@ SwiftFieldOptions* SwiftFieldOptions::New(::google::protobuf::Arena* arena) cons void SwiftFieldOptions::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.SwiftFieldOptions) - if (_has_bits_[0 / 32] & 7u) { - ::memset(&realm_indexed_propertie_, 0, reinterpret_cast(&realm_override_propertie_) - - reinterpret_cast(&realm_indexed_propertie_) + sizeof(realm_override_propertie_)); + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 7u) { + ::memset(&realm_indexed_propertie_, 0, static_cast( + reinterpret_cast(&realm_override_propertie_) - + reinterpret_cast(&realm_indexed_propertie_)) + sizeof(realm_override_propertie_)); } _has_bits_.Clear(); _internal_metadata_.Clear(); @@ -1398,7 +1422,7 @@ bool SwiftFieldOptions::MergePartialFromCodedStream( // optional bool realm_indexed_propertie = 1 [default = false]; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(8u)) { + static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { set_has_realm_indexed_propertie(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -1412,7 +1436,7 @@ bool SwiftFieldOptions::MergePartialFromCodedStream( // optional bool realm_primary_key = 2 [default = false]; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(16u)) { + static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { set_has_realm_primary_key(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -1426,7 +1450,7 @@ bool SwiftFieldOptions::MergePartialFromCodedStream( // optional .google.protobuf.RealmOverrideRepeated realm_override_propertie = 3 [default = OVERRIDE]; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(24u)) { + static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) { int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( @@ -1434,7 +1458,8 @@ bool SwiftFieldOptions::MergePartialFromCodedStream( if (::google::protobuf::RealmOverrideRepeated_IsValid(value)) { set_realm_override_propertie(static_cast< ::google::protobuf::RealmOverrideRepeated >(value)); } else { - mutable_unknown_fields()->AddVarint(3, value); + mutable_unknown_fields()->AddVarint( + 3, static_cast< ::google::protobuf::uint64>(value)); } } else { goto handle_unusual; @@ -1444,13 +1469,11 @@ bool SwiftFieldOptions::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::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -1489,7 +1512,7 @@ void SwiftFieldOptions::SerializeWithCachedSizes( if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); + _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.SwiftFieldOptions) } @@ -1520,7 +1543,7 @@ ::google::protobuf::uint8* SwiftFieldOptions::InternalSerializeWithCachedSizesTo if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); + _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.SwiftFieldOptions) return target; @@ -1533,7 +1556,7 @@ size_t SwiftFieldOptions::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); + _internal_metadata_.unknown_fields()); } if (_has_bits_[0 / 32] & 7u) { // optional bool realm_indexed_propertie = 1 [default = false]; @@ -1620,12 +1643,13 @@ void SwiftFieldOptions::Swap(SwiftFieldOptions* other) { InternalSwap(other); } void SwiftFieldOptions::InternalSwap(SwiftFieldOptions* other) { - std::swap(realm_indexed_propertie_, other->realm_indexed_propertie_); - std::swap(realm_primary_key_, other->realm_primary_key_); - std::swap(realm_override_propertie_, other->realm_override_propertie_); - std::swap(_has_bits_[0], other->_has_bits_[0]); + using std::swap; + swap(realm_indexed_propertie_, other->realm_indexed_propertie_); + swap(realm_primary_key_, other->realm_primary_key_); + swap(realm_override_propertie_, other->realm_override_propertie_); + swap(_has_bits_[0], other->_has_bits_[0]); _internal_metadata_.Swap(&other->_internal_metadata_); - std::swap(_cached_size_, other->_cached_size_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata SwiftFieldOptions::GetMetadata() const { @@ -1734,15 +1758,16 @@ SwiftEnumOptions::SwiftEnumOptions(const SwiftEnumOptions& from) _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); ::memcpy(&generate_error_type_, &from.generate_error_type_, - reinterpret_cast(&generate_realm_object_) - - reinterpret_cast(&generate_error_type_) + sizeof(generate_realm_object_)); + static_cast(reinterpret_cast(&generate_realm_object_) - + reinterpret_cast(&generate_error_type_)) + sizeof(generate_realm_object_)); // @@protoc_insertion_point(copy_constructor:google.protobuf.SwiftEnumOptions) } void SwiftEnumOptions::SharedCtor() { _cached_size_ = 0; - ::memset(&generate_error_type_, 0, reinterpret_cast(&generate_realm_object_) - - reinterpret_cast(&generate_error_type_) + sizeof(generate_realm_object_)); + ::memset(&generate_error_type_, 0, static_cast( + reinterpret_cast(&generate_realm_object_) - + reinterpret_cast(&generate_error_type_)) + sizeof(generate_realm_object_)); } SwiftEnumOptions::~SwiftEnumOptions() { @@ -1778,9 +1803,15 @@ SwiftEnumOptions* SwiftEnumOptions::New(::google::protobuf::Arena* arena) const void SwiftEnumOptions::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.SwiftEnumOptions) - if (_has_bits_[0 / 32] & 7u) { - ::memset(&generate_error_type_, 0, reinterpret_cast(&generate_realm_object_) - - reinterpret_cast(&generate_error_type_) + sizeof(generate_realm_object_)); + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 7u) { + ::memset(&generate_error_type_, 0, static_cast( + reinterpret_cast(&generate_realm_object_) - + reinterpret_cast(&generate_error_type_)) + sizeof(generate_realm_object_)); } _has_bits_.Clear(); _internal_metadata_.Clear(); @@ -1799,7 +1830,7 @@ bool SwiftEnumOptions::MergePartialFromCodedStream( // optional bool generate_error_type = 1 [default = false]; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(8u)) { + static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { set_has_generate_error_type(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -1813,7 +1844,7 @@ bool SwiftEnumOptions::MergePartialFromCodedStream( // optional bool generate_react = 2 [default = false]; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(16u)) { + static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { set_has_generate_react(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -1827,7 +1858,7 @@ bool SwiftEnumOptions::MergePartialFromCodedStream( // optional bool generate_realm_object = 3 [default = false]; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(24u)) { + static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) { set_has_generate_realm_object(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -1840,13 +1871,11 @@ bool SwiftEnumOptions::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::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -1884,7 +1913,7 @@ void SwiftEnumOptions::SerializeWithCachedSizes( if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); + _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.SwiftEnumOptions) } @@ -1914,7 +1943,7 @@ ::google::protobuf::uint8* SwiftEnumOptions::InternalSerializeWithCachedSizesToA if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); + _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.SwiftEnumOptions) return target; @@ -1927,7 +1956,7 @@ size_t SwiftEnumOptions::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); + _internal_metadata_.unknown_fields()); } if (_has_bits_[0 / 32] & 7u) { // optional bool generate_error_type = 1 [default = false]; @@ -2013,12 +2042,13 @@ void SwiftEnumOptions::Swap(SwiftEnumOptions* other) { InternalSwap(other); } void SwiftEnumOptions::InternalSwap(SwiftEnumOptions* other) { - std::swap(generate_error_type_, other->generate_error_type_); - std::swap(generate_react_, other->generate_react_); - std::swap(generate_realm_object_, other->generate_realm_object_); - std::swap(_has_bits_[0], other->_has_bits_[0]); + using std::swap; + swap(generate_error_type_, other->generate_error_type_); + swap(generate_react_, other->generate_react_); + swap(generate_realm_object_, other->generate_realm_object_); + swap(_has_bits_[0], other->_has_bits_[0]); _internal_metadata_.Swap(&other->_internal_metadata_); - std::swap(_cached_size_, other->_cached_size_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata SwiftEnumOptions::GetMetadata() const { diff --git a/plugin/compiler/google/protobuf/swift-descriptor.pb.h b/plugin/compiler/google/protobuf/swift-descriptor.pb.h index 2c66639..e743644 100644 --- a/plugin/compiler/google/protobuf/swift-descriptor.pb.h +++ b/plugin/compiler/google/protobuf/swift-descriptor.pb.h @@ -8,12 +8,12 @@ #include -#if GOOGLE_PROTOBUF_VERSION < 3003000 +#if GOOGLE_PROTOBUF_VERSION < 3004000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3003002 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3004000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. @@ -34,75 +34,6 @@ // @@protoc_insertion_point(includes) namespace google { namespace protobuf { -class DescriptorProto; -class DescriptorProtoDefaultTypeInternal; -extern DescriptorProtoDefaultTypeInternal _DescriptorProto_default_instance_; -class DescriptorProto_ExtensionRange; -class DescriptorProto_ExtensionRangeDefaultTypeInternal; -extern DescriptorProto_ExtensionRangeDefaultTypeInternal _DescriptorProto_ExtensionRange_default_instance_; -class DescriptorProto_ReservedRange; -class DescriptorProto_ReservedRangeDefaultTypeInternal; -extern DescriptorProto_ReservedRangeDefaultTypeInternal _DescriptorProto_ReservedRange_default_instance_; -class EnumDescriptorProto; -class EnumDescriptorProtoDefaultTypeInternal; -extern EnumDescriptorProtoDefaultTypeInternal _EnumDescriptorProto_default_instance_; -class EnumOptions; -class EnumOptionsDefaultTypeInternal; -extern EnumOptionsDefaultTypeInternal _EnumOptions_default_instance_; -class EnumValueDescriptorProto; -class EnumValueDescriptorProtoDefaultTypeInternal; -extern EnumValueDescriptorProtoDefaultTypeInternal _EnumValueDescriptorProto_default_instance_; -class EnumValueOptions; -class EnumValueOptionsDefaultTypeInternal; -extern EnumValueOptionsDefaultTypeInternal _EnumValueOptions_default_instance_; -class FieldDescriptorProto; -class FieldDescriptorProtoDefaultTypeInternal; -extern FieldDescriptorProtoDefaultTypeInternal _FieldDescriptorProto_default_instance_; -class FieldOptions; -class FieldOptionsDefaultTypeInternal; -extern FieldOptionsDefaultTypeInternal _FieldOptions_default_instance_; -class FileDescriptorProto; -class FileDescriptorProtoDefaultTypeInternal; -extern FileDescriptorProtoDefaultTypeInternal _FileDescriptorProto_default_instance_; -class FileDescriptorSet; -class FileDescriptorSetDefaultTypeInternal; -extern FileDescriptorSetDefaultTypeInternal _FileDescriptorSet_default_instance_; -class FileOptions; -class FileOptionsDefaultTypeInternal; -extern FileOptionsDefaultTypeInternal _FileOptions_default_instance_; -class GeneratedCodeInfo; -class GeneratedCodeInfoDefaultTypeInternal; -extern GeneratedCodeInfoDefaultTypeInternal _GeneratedCodeInfo_default_instance_; -class GeneratedCodeInfo_Annotation; -class GeneratedCodeInfo_AnnotationDefaultTypeInternal; -extern GeneratedCodeInfo_AnnotationDefaultTypeInternal _GeneratedCodeInfo_Annotation_default_instance_; -class MessageOptions; -class MessageOptionsDefaultTypeInternal; -extern MessageOptionsDefaultTypeInternal _MessageOptions_default_instance_; -class MethodDescriptorProto; -class MethodDescriptorProtoDefaultTypeInternal; -extern MethodDescriptorProtoDefaultTypeInternal _MethodDescriptorProto_default_instance_; -class MethodOptions; -class MethodOptionsDefaultTypeInternal; -extern MethodOptionsDefaultTypeInternal _MethodOptions_default_instance_; -class OneofDescriptorProto; -class OneofDescriptorProtoDefaultTypeInternal; -extern OneofDescriptorProtoDefaultTypeInternal _OneofDescriptorProto_default_instance_; -class OneofOptions; -class OneofOptionsDefaultTypeInternal; -extern OneofOptionsDefaultTypeInternal _OneofOptions_default_instance_; -class ServiceDescriptorProto; -class ServiceDescriptorProtoDefaultTypeInternal; -extern ServiceDescriptorProtoDefaultTypeInternal _ServiceDescriptorProto_default_instance_; -class ServiceOptions; -class ServiceOptionsDefaultTypeInternal; -extern ServiceOptionsDefaultTypeInternal _ServiceOptions_default_instance_; -class SourceCodeInfo; -class SourceCodeInfoDefaultTypeInternal; -extern SourceCodeInfoDefaultTypeInternal _SourceCodeInfo_default_instance_; -class SourceCodeInfo_Location; -class SourceCodeInfo_LocationDefaultTypeInternal; -extern SourceCodeInfo_LocationDefaultTypeInternal _SourceCodeInfo_Location_default_instance_; class SwiftEnumOptions; class SwiftEnumOptionsDefaultTypeInternal; extern SwiftEnumOptionsDefaultTypeInternal _SwiftEnumOptions_default_instance_; @@ -115,12 +46,6 @@ extern SwiftFileOptionsDefaultTypeInternal _SwiftFileOptions_default_instance_; class SwiftMessageOptions; class SwiftMessageOptionsDefaultTypeInternal; extern SwiftMessageOptionsDefaultTypeInternal _SwiftMessageOptions_default_instance_; -class UninterpretedOption; -class UninterpretedOptionDefaultTypeInternal; -extern UninterpretedOptionDefaultTypeInternal _UninterpretedOption_default_instance_; -class UninterpretedOption_NamePart; -class UninterpretedOption_NamePartDefaultTypeInternal; -extern UninterpretedOption_NamePartDefaultTypeInternal _UninterpretedOption_NamePart_default_instance_; } // namespace protobuf } // namespace google @@ -134,8 +59,9 @@ struct TableStruct { static const ::google::protobuf::internal::AuxillaryParseTableField aux[]; static const ::google::protobuf::internal::ParseTable schema[]; static const ::google::protobuf::uint32 offsets[]; + static const ::google::protobuf::internal::FieldMetadata field_metadata[]; + static const ::google::protobuf::internal::SerializationTable serialization_table[]; static void InitDefaultsImpl(); - static void Shutdown(); }; void AddDescriptors(); void InitDefaults(); @@ -192,11 +118,24 @@ class SwiftFileOptions : public ::google::protobuf::Message /* @@protoc_insertio CopyFrom(from); return *this; } + #if LANG_CXX11 + SwiftFileOptions(SwiftFileOptions&& from) noexcept + : SwiftFileOptions() { + *this = ::std::move(from); + } + inline SwiftFileOptions& operator=(SwiftFileOptions&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } @@ -212,6 +151,9 @@ class SwiftFileOptions : public ::google::protobuf::Message /* @@protoc_insertio 0; void Swap(SwiftFileOptions* other); + friend void swap(SwiftFileOptions& a, SwiftFileOptions& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -342,11 +284,24 @@ class SwiftMessageOptions : public ::google::protobuf::Message /* @@protoc_inser CopyFrom(from); return *this; } + #if LANG_CXX11 + SwiftMessageOptions(SwiftMessageOptions&& from) noexcept + : SwiftMessageOptions() { + *this = ::std::move(from); + } + inline SwiftMessageOptions& operator=(SwiftMessageOptions&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } @@ -362,6 +317,9 @@ class SwiftMessageOptions : public ::google::protobuf::Message /* @@protoc_inser 1; void Swap(SwiftMessageOptions* other); + friend void swap(SwiftMessageOptions& a, SwiftMessageOptions& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -454,11 +412,24 @@ class SwiftFieldOptions : public ::google::protobuf::Message /* @@protoc_inserti CopyFrom(from); return *this; } + #if LANG_CXX11 + SwiftFieldOptions(SwiftFieldOptions&& from) noexcept + : SwiftFieldOptions() { + *this = ::std::move(from); + } + inline SwiftFieldOptions& operator=(SwiftFieldOptions&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } @@ -474,6 +445,9 @@ class SwiftFieldOptions : public ::google::protobuf::Message /* @@protoc_inserti 2; void Swap(SwiftFieldOptions* other); + friend void swap(SwiftFieldOptions& a, SwiftFieldOptions& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -566,11 +540,24 @@ class SwiftEnumOptions : public ::google::protobuf::Message /* @@protoc_insertio CopyFrom(from); return *this; } + #if LANG_CXX11 + SwiftEnumOptions(SwiftEnumOptions&& from) noexcept + : SwiftEnumOptions() { + *this = ::std::move(from); + } + inline SwiftEnumOptions& operator=(SwiftEnumOptions&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } @@ -586,6 +573,9 @@ class SwiftEnumOptions : public ::google::protobuf::Message /* @@protoc_insertio 3; void Swap(SwiftEnumOptions* other); + friend void swap(SwiftEnumOptions& a, SwiftEnumOptions& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -687,6 +677,10 @@ extern ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::En // =================================================================== #if !PROTOBUF_INLINE_NOT_IN_HEADERS +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ // SwiftFileOptions // optional string class_prefix = 1; @@ -1102,6 +1096,9 @@ inline void SwiftEnumOptions::set_generate_realm_object(bool value) { // @@protoc_insertion_point(field_set:google.protobuf.SwiftEnumOptions.generate_realm_object) } +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS // ------------------------------------------------------------------- @@ -1116,7 +1113,6 @@ inline void SwiftEnumOptions::set_generate_realm_object(bool value) { } // namespace protobuf } // namespace google -#ifndef SWIG namespace google { namespace protobuf { @@ -1133,7 +1129,6 @@ inline const EnumDescriptor* GetEnumDescriptor< ::google::protobuf::RealmOverrid } // namespace protobuf } // namespace google -#endif // SWIG // @@protoc_insertion_point(global_scope) diff --git a/plugin/compiler/react_native/swift_generator.cc b/plugin/compiler/react_native/swift_generator.cc index bd10b58..bb49cc7 100644 --- a/plugin/compiler/react_native/swift_generator.cc +++ b/plugin/compiler/react_native/swift_generator.cc @@ -42,7 +42,7 @@ namespace google { namespace protobuf { namespace compiler { namespace swift { - static map packages; + static std::map packages; vector< pair > options; ParseGeneratorParameter(parameter, &options); diff --git a/plugin/compiler/react_native/swift_helpers_react.cc b/plugin/compiler/react_native/swift_helpers_react.cc index c982413..1350795 100644 --- a/plugin/compiler/react_native/swift_helpers_react.cc +++ b/plugin/compiler/react_native/swift_helpers_react.cc @@ -26,6 +26,7 @@ namespace google { namespace protobuf { namespace compiler { namespace swift { + using namespace std; string DefaultValueReact(const FieldDescriptor* field) { diff --git a/plugin/compiler/react_native/swift_react.cc b/plugin/compiler/react_native/swift_react.cc index 8e2e6c7..47dd401 100644 --- a/plugin/compiler/react_native/swift_react.cc +++ b/plugin/compiler/react_native/swift_react.cc @@ -35,7 +35,7 @@ namespace google { namespace protobuf { namespace compiler { namespace swift { namespace { - void SetMapVariables(const Descriptor* descriptor, map* variables) { + void SetMapVariables(const Descriptor* descriptor, std::map* variables) { (*variables)["classNameReaсt"] = ClassNameReact(descriptor); diff --git a/plugin/compiler/react_native/swift_react.h b/plugin/compiler/react_native/swift_react.h index 59ac3fc..990b9a2 100644 --- a/plugin/compiler/react_native/swift_react.h +++ b/plugin/compiler/react_native/swift_react.h @@ -45,7 +45,7 @@ namespace google { const Descriptor* descriptor_; - map variables_; + std::map variables_; GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ReactGenerator); diff --git a/plugin/compiler/react_native/swift_react_enums.cc b/plugin/compiler/react_native/swift_react_enums.cc index 91efcfd..a338f2e 100644 --- a/plugin/compiler/react_native/swift_react_enums.cc +++ b/plugin/compiler/react_native/swift_react_enums.cc @@ -35,7 +35,7 @@ namespace google { namespace protobuf { namespace compiler { namespace swift { namespace { - void SetMapVariables(const EnumDescriptor* descriptor, map* variables) { + void SetMapVariables(const EnumDescriptor* descriptor, std::map* variables) { (*variables)["classNameReaсt"] = ClassNameReact(descriptor); } diff --git a/plugin/compiler/react_native/swift_react_enums.h b/plugin/compiler/react_native/swift_react_enums.h index 471abb1..dcdccdf 100644 --- a/plugin/compiler/react_native/swift_react_enums.h +++ b/plugin/compiler/react_native/swift_react_enums.h @@ -45,7 +45,7 @@ namespace google { const EnumDescriptor* descriptor_; - map variables_; + std::map variables_; GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ReactEnumGenerator); diff --git a/plugin/compiler/realm/swift_enum_realm.cc b/plugin/compiler/realm/swift_enum_realm.cc index 458905d..c247d38 100644 --- a/plugin/compiler/realm/swift_enum_realm.cc +++ b/plugin/compiler/realm/swift_enum_realm.cc @@ -35,7 +35,7 @@ namespace google { namespace protobuf { namespace compiler { namespace swift { namespace { - void SetMapVariables(const EnumDescriptor* descriptor, map* variables) { + void SetMapVariables(const EnumDescriptor* descriptor, std::map* variables) { (*variables)["acontrol"] = GetAccessControlType(descriptor->file()); (*variables)["errorType"] = HasOptionForGenerateErrors(descriptor) ? ", Error" : ""; (*variables)["classNameReturnedType"] = ClassNameReturedType(descriptor); diff --git a/plugin/compiler/realm/swift_enum_realm.h b/plugin/compiler/realm/swift_enum_realm.h index df062e9..b4fed43 100644 --- a/plugin/compiler/realm/swift_enum_realm.h +++ b/plugin/compiler/realm/swift_enum_realm.h @@ -44,7 +44,7 @@ namespace google { const EnumDescriptor* descriptor_; - map variables_; + std::map variables_; GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(RealmEnumGenerator); diff --git a/plugin/compiler/realm/swift_generator.cc b/plugin/compiler/realm/swift_generator.cc index 1936572..ada0857 100644 --- a/plugin/compiler/realm/swift_generator.cc +++ b/plugin/compiler/realm/swift_generator.cc @@ -43,7 +43,7 @@ namespace google { namespace protobuf { namespace compiler { namespace swift { - static map packages; + static std::map packages; vector< pair > options; ParseGeneratorParameter(parameter, &options); diff --git a/plugin/compiler/realm/swift_helpers_realm.cc b/plugin/compiler/realm/swift_helpers_realm.cc index cb91d78..79ab9ae 100644 --- a/plugin/compiler/realm/swift_helpers_realm.cc +++ b/plugin/compiler/realm/swift_helpers_realm.cc @@ -26,6 +26,7 @@ namespace google { namespace protobuf { namespace compiler { namespace swift { + using namespace std; string DefaultValueRealm(const FieldDescriptor* field) { diff --git a/plugin/compiler/realm/swift_message_realm.cc b/plugin/compiler/realm/swift_message_realm.cc index 821c3c7..a3e8524 100644 --- a/plugin/compiler/realm/swift_message_realm.cc +++ b/plugin/compiler/realm/swift_message_realm.cc @@ -36,7 +36,7 @@ namespace google { namespace protobuf { namespace compiler { namespace swift { namespace { - void SetMapVariables(const Descriptor* descriptor, map* variables) { + void SetMapVariables(const Descriptor* descriptor, std::map* variables) { (*variables)["acontrol"] = GetAccessControlType(descriptor->file()); (*variables)["errorType"] = HasOptionForGenerateErrors(descriptor) ? ", Error" : ""; (*variables)["classNameReturnedType"] = ClassNameReturedType(descriptor); diff --git a/plugin/compiler/realm/swift_message_realm.h b/plugin/compiler/realm/swift_message_realm.h index f720423..48834fe 100644 --- a/plugin/compiler/realm/swift_message_realm.h +++ b/plugin/compiler/realm/swift_message_realm.h @@ -44,7 +44,7 @@ namespace google { const Descriptor* descriptor_; - map variables_; + std::map variables_; GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(RealmMessageGenerator); diff --git a/plugin/compiler/swift_enum_field.cc b/plugin/compiler/swift_enum_field.cc index c3039b9..ec8038b 100644 --- a/plugin/compiler/swift_enum_field.cc +++ b/plugin/compiler/swift_enum_field.cc @@ -30,7 +30,7 @@ namespace google { namespace protobuf { namespace compiler { namespace swift { namespace { - void SetEnumVariables(const FieldDescriptor* descriptor, map* variables) { + void SetEnumVariables(const FieldDescriptor* descriptor, std::map* variables) { const EnumValueDescriptor* default_value; default_value = descriptor->default_value_enum(); diff --git a/plugin/compiler/swift_enum_field.h b/plugin/compiler/swift_enum_field.h index b16d9fc..bb47edd 100644 --- a/plugin/compiler/swift_enum_field.h +++ b/plugin/compiler/swift_enum_field.h @@ -55,7 +55,7 @@ namespace google { private: const FieldDescriptor* descriptor_; - map variables_; + std::map variables_; GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumFieldGenerator); }; @@ -87,7 +87,7 @@ namespace google { private: const FieldDescriptor* descriptor_; - map variables_; + std::map variables_; GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(RepeatedEnumFieldGenerator); }; diff --git a/plugin/compiler/swift_extension.cc b/plugin/compiler/swift_extension.cc index 00e3b66..9903ffc 100644 --- a/plugin/compiler/swift_extension.cc +++ b/plugin/compiler/swift_extension.cc @@ -37,7 +37,7 @@ namespace google { namespace protobuf { namespace compiler { namespace swift { void ExtensionGenerator::GenerateFieldsGetterSource(io::Printer* printer, string rootclassname) { - map vars; + std::map vars; vars["name"] = UnderscoresToCamelCase(descriptor_); //// vars["containing_type"] = classname_; @@ -74,7 +74,7 @@ namespace google { namespace protobuf { namespace compiler { namespace swift { } void ExtensionGenerator::GenerateFieldsSource(io::Printer* printer) { - map vars; + std::map vars; vars["name"] = UnderscoresToCamelCase(descriptor_); vars["containing_type"] = classname_; @@ -96,7 +96,7 @@ namespace google { namespace protobuf { namespace compiler { namespace swift { } void ExtensionGenerator::GenerateMembersSourceExtensions(io::Printer* printer, string fileClass) { - map vars; + std::map vars; vars["name"] = UnderscoresToCamelCase(descriptor_); vars["containing_type"] = classname_; vars["rootclass_type"] = fileClass; @@ -108,7 +108,7 @@ namespace google { namespace protobuf { namespace compiler { namespace swift { } void ExtensionGenerator::GenerateMembersSource(io::Printer* printer) { - map vars; + std::map vars; vars["name"] = UnderscoresToCamelCase(descriptor_); vars["containing_type"] = classname_; vars["acontrol"] = GetAccessControlType(descriptor_->file()); @@ -119,7 +119,7 @@ namespace google { namespace protobuf { namespace compiler { namespace swift { } void ExtensionGenerator::GenerateInitializationSource(io::Printer* printer) { - map vars; + std::map vars; vars["name"] = UnderscoresToCamelCase(descriptor_); vars["containing_type"] = classname_; vars["extended_type"] = ClassNameReturedType(descriptor_->containing_type()); diff --git a/plugin/compiler/swift_generator.cc b/plugin/compiler/swift_generator.cc index c53a9be..a93f4a9 100644 --- a/plugin/compiler/swift_generator.cc +++ b/plugin/compiler/swift_generator.cc @@ -42,7 +42,7 @@ namespace google { namespace protobuf { namespace compiler { namespace swift { - static map packages; + static std::map packages; vector< pair > options; ParseGeneratorParameter(parameter, &options); diff --git a/plugin/compiler/swift_helpers.cc b/plugin/compiler/swift_helpers.cc index 8e5212b..5704b81 100644 --- a/plugin/compiler/swift_helpers.cc +++ b/plugin/compiler/swift_helpers.cc @@ -28,6 +28,8 @@ namespace google { namespace protobuf { namespace compiler { namespace swift { + using namespace std; + namespace { const string& FieldName(const FieldDescriptor* field) { if (field->type() == FieldDescriptor::TYPE_GROUP) { diff --git a/plugin/compiler/swift_map_field.cc b/plugin/compiler/swift_map_field.cc index 72f6182..f7fecd8 100644 --- a/plugin/compiler/swift_map_field.cc +++ b/plugin/compiler/swift_map_field.cc @@ -36,7 +36,7 @@ namespace google { namespace protobuf { namespace compiler { namespace swift { namespace { - void SetMapVariables(const FieldDescriptor* descriptor, map* variables) { + void SetMapVariables(const FieldDescriptor* descriptor, std::map* variables) { std::string name = UnderscoresToCamelCase(descriptor); diff --git a/plugin/compiler/swift_map_field.h b/plugin/compiler/swift_map_field.h index d49702a..5656de4 100644 --- a/plugin/compiler/swift_map_field.h +++ b/plugin/compiler/swift_map_field.h @@ -53,7 +53,7 @@ namespace google { private: const FieldDescriptor* descriptor_; - map variables_; + std::map variables_; GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MapFieldGenerator); }; diff --git a/plugin/compiler/swift_message.cc b/plugin/compiler/swift_message.cc index 3e0e08f..48eee64 100644 --- a/plugin/compiler/swift_message.cc +++ b/plugin/compiler/swift_message.cc @@ -35,10 +35,11 @@ namespace google { namespace protobuf { namespace compiler { namespace swift { using internal::WireFormat; using internal::WireFormatLite; + using namespace std; namespace { - void SetMapVariables(const Descriptor* descriptor, map* variables) { + void SetMapVariables(const Descriptor* descriptor, std::map* variables) { (*variables)["acontrol"] = GetAccessControlType(descriptor->file()); (*variables)["className"] = ClassName(descriptor); (*variables)["errorType"] = HasOptionForGenerateErrors(descriptor) ? ", Error" : ""; @@ -144,7 +145,7 @@ namespace google { namespace protobuf { namespace compiler { namespace swift { } void MessageGenerator::GenerateStaticVariablesInitialization(io::Printer* printer) { - map vars; + std::map vars; vars["index"] = SimpleItoa(descriptor_->index()); vars["className"] = ClassName(descriptor_); @@ -158,7 +159,7 @@ namespace google { namespace protobuf { namespace compiler { namespace swift { void MessageGenerator::GenerateStaticVariablesSource(io::Printer* printer) { - map vars; + std::map vars; vars["index"] = SimpleItoa(descriptor_->index()); vars["classname"] = ClassName(descriptor_); @@ -171,7 +172,7 @@ namespace google { namespace protobuf { namespace compiler { namespace swift { } void MessageGenerator::GenerateGlobalStaticVariablesSource(io::Printer* printer, string rootclass) { - map vars; + std::map vars; vars["index"] = SimpleItoa(descriptor_->index()); vars["className"] = ClassName(descriptor_); for (int i = 0; i < descriptor_->extension_count(); i++) { @@ -183,15 +184,6 @@ namespace google { namespace protobuf { namespace compiler { namespace swift { } - void MessageGenerator::DetermineDependencies(set* dependencies) { - - for (int i = 0; i < descriptor_->nested_type_count(); i++) { - - MessageGenerator(descriptor_->nested_type(i)).DetermineDependencies(dependencies); - } - } - - void MessageGenerator::GenerateExtensionRegistrationSource(io::Printer* printer) { for (int i = 0; i < descriptor_->extension_count(); i++) { ExtensionGenerator(ClassNameExtensions(descriptor_), descriptor_->extension(i)) @@ -970,7 +962,7 @@ namespace google { namespace protobuf { namespace compiler { namespace swift { if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE && HasRequiredFields(field->message_type())) { - map vars; + std::map vars; vars["type"] = ClassName(field->message_type()); vars["name"] = UnderscoresToCamelCase(field); vars["name_reserved"] = SafeName(UnderscoresToCamelCase(field)); diff --git a/plugin/compiler/swift_message.h b/plugin/compiler/swift_message.h index d92ed23..4c026ad 100644 --- a/plugin/compiler/swift_message.h +++ b/plugin/compiler/swift_message.h @@ -46,7 +46,6 @@ namespace google { void GenerateSource(io::Printer* printer); void GenerateMessageIsEqualSource(io::Printer* printer); void GenerateExtensionRegistrationSource(io::Printer* printer); - void DetermineDependencies(set* dependencies); void GenerateGlobalStaticVariablesSource(io::Printer* printer, string rootclass); void GenerateParseFromMethodsSource(io::Printer* printer); void GenerateSubscript(io::Printer* printer) const; @@ -96,7 +95,7 @@ namespace google { const Descriptor* descriptor_; FieldGeneratorMap field_generators_; - map variables_; + std::map variables_; GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageGenerator); diff --git a/plugin/compiler/swift_message_field.cc b/plugin/compiler/swift_message_field.cc index d4ff8e1..53e273c 100644 --- a/plugin/compiler/swift_message_field.cc +++ b/plugin/compiler/swift_message_field.cc @@ -29,7 +29,7 @@ namespace google { namespace protobuf { namespace compiler { namespace swift { namespace { - void SetMessageVariables(const FieldDescriptor* descriptor, map* variables) { + void SetMessageVariables(const FieldDescriptor* descriptor, std::map* variables) { std::string name = UnderscoresToCamelCase(descriptor); std::string capname = UnderscoresToCapitalizedCamelCase(descriptor); diff --git a/plugin/compiler/swift_message_field.h b/plugin/compiler/swift_message_field.h index 35952a5..8e0511e 100644 --- a/plugin/compiler/swift_message_field.h +++ b/plugin/compiler/swift_message_field.h @@ -55,7 +55,7 @@ namespace google { private: const FieldDescriptor* descriptor_; - map variables_; + std::map variables_; GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageFieldGenerator); }; @@ -87,7 +87,7 @@ namespace google { private: const FieldDescriptor* descriptor_; - map variables_; + std::map variables_; GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(RepeatedMessageFieldGenerator); }; diff --git a/plugin/compiler/swift_primitive_field.cc b/plugin/compiler/swift_primitive_field.cc index 0597de3..d74cffd 100644 --- a/plugin/compiler/swift_primitive_field.cc +++ b/plugin/compiler/swift_primitive_field.cc @@ -74,7 +74,7 @@ namespace google { namespace protobuf { namespace compiler { namespace swift { return -1; } - void SetPrimitiveVariables(const FieldDescriptor* descriptor, map* variables) { + void SetPrimitiveVariables(const FieldDescriptor* descriptor, std::map* variables) { std::string name = UnderscoresToCamelCase(descriptor); std::string capname = UnderscoresToCapitalizedCamelCase(descriptor); (*variables)["containing_class"] = ClassNameReturedType(descriptor->containing_type()); diff --git a/plugin/compiler/swift_primitive_field.h b/plugin/compiler/swift_primitive_field.h index e32be20..50265ee 100644 --- a/plugin/compiler/swift_primitive_field.h +++ b/plugin/compiler/swift_primitive_field.h @@ -22,7 +22,6 @@ #include #include #include "swift_field.h" - namespace google { namespace protobuf { namespace compiler { @@ -53,7 +52,7 @@ namespace google { private: const FieldDescriptor* descriptor_; - map variables_; + std::map variables_; GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(PrimitiveFieldGenerator); }; @@ -83,7 +82,7 @@ namespace google { private: const FieldDescriptor* descriptor_; - map variables_; + std::map variables_; GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(RepeatedPrimitiveFieldGenerator); };