aboutsummaryrefslogtreecommitdiff
path: root/objectivec/GPBRootObject.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/GPBRootObject.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/GPBRootObject.m')
-rw-r--r--objectivec/GPBRootObject.m8
1 files changed, 8 insertions, 0 deletions
diff --git a/objectivec/GPBRootObject.m b/objectivec/GPBRootObject.m
index 585d205a..bad2f9a7 100644
--- a/objectivec/GPBRootObject.m
+++ b/objectivec/GPBRootObject.m
@@ -43,6 +43,14 @@
- (const char *)singletonNameC;
@end
+// We need some object to conform to the MessageSignatureProtocol to make sure
+// the selectors in it are recorded in our Objective C runtime information.
+// GPBMessage is arguably the more "obvious" choice, but given that all messages
+// inherit from GPBMessage, conflicts seem likely, so we are using GPBRootObject
+// instead.
+@interface GPBRootObject () <GPBMessageSignatureProtocol>
+@end
+
@implementation GPBRootObject
// Taken from http://www.burtleburtle.net/bob/hash/doobs.html