Cleanup: use arrayWithObject to reduce the code

Similar code is found in Apple's code samples.

Differential Revision: https://developer.blender.org/D11434
This commit is contained in:
Yuki Hashimoto 2021-07-05 12:57:28 +02:00 committed by Brecht Van Lommel
parent 24a77745a4
commit c1ba68dd04
1 changed files with 1 additions and 6 deletions

View File

@ -74,12 +74,7 @@
composing = YES;
// interpret event to call insertText
NSMutableArray *events;
events = [[NSMutableArray alloc] initWithCapacity:1];
[events addObject:event];
[self interpretKeyEvents:events]; // calls insertText
[events removeObject:event];
[events release];
[self interpretKeyEvents:[NSArray arrayWithObject:event]]; // calls insertText
return;
}
}