Peter Hosey  committed d8b57df

Make our appendCharacter: method faster by not creating and throwing away a string every time—instead, use CF to append the character directly. This, in turn, makes our Base64 code much faster.

  • Participants
  • Parent commits 7fd8e11
  • Branches default

Comments (0)

Files changed (1)

File Common/Source/NSMutableStringAdditions.m

 @implementation NSMutableString (GrowlAdditions)
 - (void) appendCharacter:(unichar)ch {
-	NSString *tmp = [[NSString alloc] initWithCharactersNoCopy:&ch length:1U freeWhenDone:NO];
-	[self appendString:tmp];
-	[tmp release];
+	CFStringAppendCharacters((CFMutableStringRef)self, &ch, /*numChars*/ 1L);