mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-01-11 10:30:09 +00:00
Simplify some code, style changes
This commit is contained in:
parent
4ee413bc35
commit
72c79d1a6d
@ -71,7 +71,7 @@ void prefs_exit()
|
||||
{
|
||||
DiskType *d = (DiskType*)[diskArray objectAtIndex:row];
|
||||
|
||||
if([[col identifier] isEqualTo:@"isCDROMcol"]) {
|
||||
if ([[col identifier] isEqualTo:@"isCDROMcol"]) {
|
||||
return [NSString stringWithFormat:@"%d", [d isCDROM]];
|
||||
}
|
||||
|
||||
@ -260,12 +260,7 @@ static NSString *makeRelativeIfNecessary(NSString *path)
|
||||
DiskType *d = [[DiskType alloc] init];
|
||||
[d setPath:makeRelativeIfNecessary([open filename])];
|
||||
|
||||
if([isCDROMcheckbox state] == NSOnState) {
|
||||
[d setIsCDROM:YES];
|
||||
}
|
||||
else {
|
||||
[d setIsCDROM:NO];
|
||||
}
|
||||
[d setIsCDROM:([isCDROMcheckbox state] == NSOnState)];
|
||||
|
||||
[diskArray addObject: d];
|
||||
[disks reloadData];
|
||||
@ -303,7 +298,7 @@ static NSString *makeRelativeIfNecessary(NSString *path)
|
||||
snprintf(cmd, sizeof(cmd), "dd if=/dev/zero \"of=%s\" bs=1024k count=%d", [[save filename] UTF8String], [diskSaveSizeField intValue]);
|
||||
int ret = system(cmd);
|
||||
if (ret == 0) {
|
||||
DiskType *d=[[DiskType alloc] init];
|
||||
DiskType *d = [[DiskType alloc] init];
|
||||
[d setPath:makeRelativeIfNecessary([save filename])];
|
||||
[d setIsCDROM:NO];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user