Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuki Hashimoto <hzuika>2021-07-05 13:57:28 +0300
committerBrecht Van Lommel <brecht@blender.org>2021-07-05 14:10:08 +0300
commitc1ba68dd042c86c6650dad534bdb3687c3a8f621 (patch)
tree3a80e03467e73dbb46c1cb1086c38d28b9c33516
parent24a77745a44df011b9c2e390e3129b00086b8ea6 (diff)
Cleanup: use arrayWithObject to reduce the code
Similar code is found in Apple's code samples. Differential Revision: https://developer.blender.org/D11434
-rw-r--r--intern/ghost/intern/GHOST_WindowViewCocoa.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/intern/ghost/intern/GHOST_WindowViewCocoa.h b/intern/ghost/intern/GHOST_WindowViewCocoa.h
index f47e02704b2..b94f46b6e63 100644
--- a/intern/ghost/intern/GHOST_WindowViewCocoa.h
+++ b/intern/ghost/intern/GHOST_WindowViewCocoa.h
@@ -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;
}
}