Permalink
Browse files

Renamed -newParserWithOriginatingEndpoint: to -createParserWithOrigin…

…atingEndpoint, since the static analyzer assumed 'new' meant 'returned a retained object'
  • Loading branch information...
1 parent 1158b95 commit 6d31ebc3d8b8af78b582bfc4fbad295047ade9b4 @krevis committed Mar 17, 2011
@@ -93,7 +93,7 @@ - (void)addEndpoint:(SMDestinationEndpoint *)endpoint;
if ([endpoints containsObject:endpoint])
return;
- parser = [self newParserWithOriginatingEndpoint:endpoint];
+ parser = [self createParserWithOriginatingEndpoint:endpoint];
NSMapInsert(parsersForEndpoints, endpoint, parser);
center = [NSNotificationCenter defaultCenter];
@@ -40,7 +40,7 @@
// For subclasses only
- (MIDIReadProc)midiReadProc;
-- (SMMessageParser *)newParserWithOriginatingEndpoint:(SMEndpoint *)originatingEndpoint;
+- (SMMessageParser *)createParserWithOriginatingEndpoint:(SMEndpoint *)originatingEndpoint;
- (void)postSelectedInputStreamSourceDisappearedNotification:(id<SMInputStreamSource>)source;
- (void)postSourceListChangedNotification;
- (void)retainForIncomingMIDIWithSourceConnectionRefCon:(void *)refCon;
@@ -162,16 +162,16 @@ - (MIDIReadProc)midiReadProc;
return midiReadProc;
}
-- (SMMessageParser *)newParserWithOriginatingEndpoint:(SMEndpoint *)originatingEndpoint;
+- (SMMessageParser *)createParserWithOriginatingEndpoint:(SMEndpoint *)originatingEndpoint;
{
SMMessageParser *parser;
- parser = [[[SMMessageParser alloc] init] autorelease];
+ parser = [[SMMessageParser alloc] init];
[parser setDelegate:self];
[parser setSysExTimeOut:sysExTimeOut];
[parser setOriginatingEndpoint:originatingEndpoint];
- return parser;
+ return [parser autorelease];
}
- (void)postSelectedInputStreamSourceDisappearedNotification:(id<SMInputStreamSource>)source;
@@ -85,7 +85,7 @@ - (void)addEndpoint:(SMSourceEndpoint *)endpoint;
if ([endpoints containsObject:endpoint])
return;
- parser = [self newParserWithOriginatingEndpoint:endpoint];
+ parser = [self createParserWithOriginatingEndpoint:endpoint];
NSMapInsert(parsersForEndpoints, endpoint, parser);
center = [NSNotificationCenter defaultCenter];
@@ -43,7 +43,7 @@ - (id)init;
inputStreamSource = [[SMSimpleInputStreamSource alloc] initWithName:endpointName];
- parser = [[self newParserWithOriginatingEndpoint:nil] retain];
+ parser = [[self createParserWithOriginatingEndpoint:nil] retain];
return self;
}

0 comments on commit 6d31ebc

Please sign in to comment.