aboutsummaryrefslogtreecommitdiff
path: root/objectivec/GPBUtilities.m
diff options
context:
space:
mode:
authorDave MacLachlan <dmaclach@gmail.com>2017-11-14 15:16:04 -0800
committerDave MacLachlan <dmaclach@gmail.com>2017-11-14 15:16:04 -0800
commit37a6672c3195ac9152ffda27c731440ba05bfb97 (patch)
tree0c937ba4671ad946490bbfea30882e0ac86d2379 /objectivec/GPBUtilities.m
parent91ff83c024be36e2f2728c30cd7eedcec9220d1a (diff)
downloadprotobuf-37a6672c3195ac9152ffda27c731440ba05bfb97.tar.gz
protobuf-37a6672c3195ac9152ffda27c731440ba05bfb97.tar.bz2
protobuf-37a6672c3195ac9152ffda27c731440ba05bfb97.zip
Remove unreferenced 'GPBMessageSignatureProtocol' class.
Remove unreferenced 'GPBMessageSignatureProtocol' class that is just taking up space in the Objective C runtime information by hanging the protocol it needs to declare off of GPBRootObject instead. Small binary size reduction, but more importantly a removal of a class that appears to be unused when statically analyzed.
Diffstat (limited to 'objectivec/GPBUtilities.m')
-rw-r--r--objectivec/GPBUtilities.m13
1 files changed, 3 insertions, 10 deletions
diff --git a/objectivec/GPBUtilities.m b/objectivec/GPBUtilities.m
index 5029ec73..f5f0d019 100644
--- a/objectivec/GPBUtilities.m
+++ b/objectivec/GPBUtilities.m
@@ -1216,8 +1216,11 @@ void GPBSetMessageMapField(GPBMessage *self, GPBFieldDescriptor *field,
const char *GPBMessageEncodingForSelector(SEL selector, BOOL instanceSel) {
Protocol *protocol =
objc_getProtocol(GPBStringifySymbol(GPBMessageSignatureProtocol));
+ NSCAssert(protocol, @"Missing GPBMessageSignatureProtocol");
struct objc_method_description description =
protocol_getMethodDescription(protocol, selector, NO, instanceSel);
+ NSCAssert(description.name != Nil && description.types != nil,
+ @"Missing method for selector %@", NSStringFromSelector(selector));
return description.types;
}
@@ -1911,13 +1914,3 @@ BOOL GPBClassHasSel(Class aClass, SEL sel) {
free(methodList);
return result;
}
-
-#pragma mark - GPBMessageSignatureProtocol
-
-// A series of selectors that are used solely to get @encoding values
-// for them by the dynamic protobuf runtime code. An object using the protocol
-// needs to be declared for the protocol to be valid at runtime.
-@interface GPBMessageSignatureProtocol : NSObject<GPBMessageSignatureProtocol>
-@end
-@implementation GPBMessageSignatureProtocol
-@end