Thrift: Whitespace cleanup.
Summary:
- Expanded tabs to spaces where spaces were the norm.
- Deleted almost all trailing whitespace.
- Added newlines to the ends of a few files.
- Ran dos2unix on one file or two.
Reviewed By: mcslee
Test Plan: git diff -b
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665467 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cocoa/src/protocol/TBinaryProtocol.m b/lib/cocoa/src/protocol/TBinaryProtocol.m
index 7564f5d..e196138 100644
--- a/lib/cocoa/src/protocol/TBinaryProtocol.m
+++ b/lib/cocoa/src/protocol/TBinaryProtocol.m
@@ -7,13 +7,13 @@
static TBinaryProtocolFactory * gSharedFactory = nil;
-@implementation TBinaryProtocolFactory
+@implementation TBinaryProtocolFactory
+ (TBinaryProtocolFactory *) sharedFactory {
if (gSharedFactory == nil) {
gSharedFactory = [[TBinaryProtocolFactory alloc] init];
}
-
+
return gSharedFactory;
}
@@ -32,7 +32,7 @@
return [self initWithTransport: transport strictRead: NO strictWrite: NO];
}
-- (id) initWithTransport: (id <TTransport>) transport
+- (id) initWithTransport: (id <TTransport>) transport
strictRead: (BOOL) strictRead
strictWrite: (BOOL) strictWrite
{
@@ -109,7 +109,7 @@
@throw [TProtocolException exceptionWithName: @"TProtocolException"
reason: [NSString stringWithFormat: @"Message too big. Size limit is: %d Message size is: %d",
mMessageSizeLimit,
- size]];
+ size]];
}
NSString * messageName = [self readStringBody: size];
if (name != NULL) {
@@ -151,7 +151,7 @@
int ft = [self readByte];
if (fieldType != NULL) {
*fieldType = ft;
- }
+ }
if (ft != TType_STOP) {
int fid = [self readI16];
if (fieldID != NULL) {
@@ -233,7 +233,7 @@
int32_t size = [self readI32];
uint8_t * buff = malloc(size);
if (buff == NULL) {
- @throw [TProtocolException
+ @throw [TProtocolException
exceptionWithName: @"TProtocolException"
reason: [NSString stringWithFormat: @"Out of memory. Unable to allocate %d bytes trying to read binary data.",
size]];
@@ -395,7 +395,7 @@
}
-- (void) writeBinary: (NSData *) data
+- (void) writeBinary: (NSData *) data
{
[self writeI32: [data length]];
[mTransport write: [data bytes] offset: 0 length: [data length]];