[[blah alloc] init] becomes [blah new]

This commit is contained in:
nigel 2002-12-18 11:50:12 +00:00
parent fc8a542d53
commit bfbeb17a96
2 changed files with 10 additions and 12 deletions

View File

@ -42,7 +42,7 @@
- (id) init - (id) init
{ {
#ifdef ENABLE_MULTIPLE #ifdef ENABLE_MULTIPLE
emulators = [[NSMutableArray alloc] init]; emulators = [NSMutableArray new];
#endif #endif
return [super init]; return [super init];
} }

View File

@ -37,10 +37,10 @@
#import <prefs.h> #import <prefs.h>
#import <timer.h> #import <timer.h>
#undef check() // memory.h defines a check macro, which clashes with an OS X one? #undef check() // memory.h defines a check macro, clashes with an OS X one?
#import <cpu_emulation.h> #import <cpu_emulation.h>
#define DEBUG 1 #define DEBUG 0
#import <debug.h> #import <debug.h>
// NSWindow method, which is invoked via delegation // NSWindow method, which is invoked via delegation
@ -120,8 +120,6 @@
- (NSSlider *) speed { return speed; } - (NSSlider *) speed { return speed; }
- (NSWindow *) window { return win; } - (NSWindow *) window { return win; }
//#define DEBUG 1
//#include <debug.h>
// Update some UI elements // Update some UI elements
@ -184,7 +182,7 @@
[emul terminate]; QuitEmuNoExit(); [emul terminate]; QuitEmuNoExit();
emul = [[NNThread alloc] init]; emul = [NNThread new];
[emul perform:@selector(emulThread) of:self]; [emul perform:@selector(emulThread) of:self];
[emul start]; [emul start];
@ -314,11 +312,11 @@ uint8 lastXPRAM[XPRAM_SIZE]; // Copy of PRAM
[NSThread detachNewThreadSelector:(SEL)"" toTarget:nil withObject:nil]; [NSThread detachNewThreadSelector:(SEL)"" toTarget:nil withObject:nil];
//emul = [[NNThread alloc] initWithAutoReleasePool]; //emul = [[NNThread alloc] initWithAutoReleasePool];
#endif #endif
emul = [[NNThread alloc] init]; emul = [NNThread new];
RTC = [[NNTimer alloc] init]; RTC = [NNTimer new];
redraw = [[NNTimer alloc] init]; redraw = [NNTimer new];
tick = [[NNTimer alloc] init]; tick = [NNTimer new];
xPRAM = [[NNTimer alloc] init]; xPRAM = [NNTimer new];
[emul perform:@selector(emulThread) of:self]; [emul perform:@selector(emulThread) of:self];
[RTC repeat:@selector(RTCinterrupt) of:self [RTC repeat:@selector(RTCinterrupt) of:self
@ -360,7 +358,7 @@ uint8 lastXPRAM[XPRAM_SIZE]; // Copy of PRAM
- (void) emulThread - (void) emulThread
{ {
extern uint8 *RAMBaseHost, *ROMBaseHost; extern uint8 *RAMBaseHost, *ROMBaseHost;
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSAutoreleasePool *pool = [NSAutoreleasePool new];
InitEmulator(); InitEmulator();