From 66186e30c97663acd5a6e45abbc1da037ec132f5 Mon Sep 17 00:00:00 2001 From: Thomas Van Lenten Date: Tue, 21 Jan 2025 14:45:37 -0800 Subject: [PATCH] [ObjC] Remove GPBDataType_Count, was internal to the runtime and never really used. PiperOrigin-RevId: 718078561 --- objectivec/GPBRuntimeTypes.h | 9 --------- objectivec/GPBWireFormat.m | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/objectivec/GPBRuntimeTypes.h b/objectivec/GPBRuntimeTypes.h index cf7ba8ec6383d..f96a324d584de 100644 --- a/objectivec/GPBRuntimeTypes.h +++ b/objectivec/GPBRuntimeTypes.h @@ -102,15 +102,6 @@ typedef NS_ENUM(uint8_t, GPBDataType) { GPBDataTypeEnum, }; -enum { - /** - * A count of the number of types in GPBDataType. Separated out from the - * GPBDataType enum to avoid warnings regarding not handling GPBDataType_Count - * in switch statements. - **/ - GPBDataType_Count = GPBDataTypeEnum + 1 -}; - /** An extension range. */ typedef struct GPBExtensionRange { /** Inclusive. */ diff --git a/objectivec/GPBWireFormat.m b/objectivec/GPBWireFormat.m index 021ea756f32c0..2a069b833fc20 100644 --- a/objectivec/GPBWireFormat.m +++ b/objectivec/GPBWireFormat.m @@ -39,7 +39,7 @@ GPBWireFormat GPBWireFormatForType(GPBDataType type, BOOL isPacked) { return GPBWireFormatLengthDelimited; } - static const GPBWireFormat format[GPBDataType_Count] = { + static const GPBWireFormat format[] = { GPBWireFormatVarint, // GPBDataTypeBool GPBWireFormatFixed32, // GPBDataTypeFixed32 GPBWireFormatFixed32, // GPBDataTypeSFixed32