Ensure the stars for all pointers belong to the variable rather than the type. Refs #614

This commit is contained in:
Jawwad Ahmad
2012-06-04 22:47:30 -04:00
parent eaa5484b01
commit abb46c382c
191 changed files with 3678 additions and 3628 deletions

View File

@@ -35,12 +35,12 @@
@synthesize object = _object;
@synthesize mapping = _mapping;
+ (id)serializerWithObject:(id)object mapping:(RKObjectMapping*)mapping
+ (id)serializerWithObject:(id)object mapping:(RKObjectMapping *)mapping
{
return [[[self alloc] initWithObject:object mapping:mapping] autorelease];
}
- (id)initWithObject:(id)object mapping:(RKObjectMapping*)mapping
- (id)initWithObject:(id)object mapping:(RKObjectMapping *)mapping
{
self = [super init];
if (self) {
@@ -59,10 +59,10 @@
}
// Return it serialized into a dictionary
- (id)serializedObject:(NSError**)error
- (id)serializedObject:(NSError **)error
{
NSMutableDictionary* dictionary = [NSMutableDictionary dictionary];
RKObjectMappingOperation* operation = [RKObjectMappingOperation mappingOperationFromObject:_object toObject:dictionary withMapping:_mapping];
NSMutableDictionary *dictionary = [NSMutableDictionary dictionary];
RKObjectMappingOperation *operation = [RKObjectMappingOperation mappingOperationFromObject:_object toObject:dictionary withMapping:_mapping];
operation.delegate = self;
BOOL success = [operation performMapping:error];
if (!success) {
@@ -78,13 +78,13 @@
return dictionary;
}
- (id)serializedObjectForMIMEType:(NSString*)MIMEType error:(NSError**)error
- (id)serializedObjectForMIMEType:(NSString *)MIMEType error:(NSError **)error
{
// TODO: This will fail for form encoded...
id serializedObject = [self serializedObject:error];
if (serializedObject) {
id<RKParser> parser = [[RKParserRegistry sharedRegistry] parserForMIMEType:MIMEType];
NSString* string = [parser stringFromObject:serializedObject error:error];
NSString *string = [parser stringFromObject:serializedObject error:error];
if (string == nil) {
return nil;
}
@@ -101,9 +101,9 @@
// Dictionaries are natively RKRequestSerializable as Form Encoded
return [self serializedObject:error];
} else {
NSString* string = [self serializedObjectForMIMEType:MIMEType error:error];
NSString *string = [self serializedObjectForMIMEType:MIMEType error:error];
if (string) {
NSData* data = [string dataUsingEncoding:NSUTF8StringEncoding];
NSData *data = [string dataUsingEncoding:NSUTF8StringEncoding];
return [RKRequestSerialization serializationWithData:data MIMEType:MIMEType];
}
}
@@ -125,7 +125,7 @@
}
} else if ([value isKindOfClass:[NSDecimalNumber class]]) {
// Precision numbers are serialized as strings to work around Javascript notation limits
transformedValue = [(NSDecimalNumber*)value stringValue];
transformedValue = [(NSDecimalNumber *)value stringValue];
} else if ([value isKindOfClass:orderedSetClass]) {
// NSOrderedSets are not natively serializable, so let's just turn it into an NSArray
transformedValue = [value array];