mirror of
https://github.com/transmission/transmission.git
synced 2026-05-08 09:39:08 +01:00
various negligible cleanup
This commit is contained in:
@@ -958,7 +958,6 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy
|
||||
didEndSelector: @selector(urlSheetDidEnd:returnCode:contextInfo:) contextInfo: nil];
|
||||
}
|
||||
|
||||
#warning combine
|
||||
- (void) openURLEndSheet: (id) sender
|
||||
{
|
||||
[fURLSheetWindow orderOut: sender];
|
||||
|
||||
@@ -159,7 +159,6 @@
|
||||
- (void) dealloc
|
||||
{
|
||||
[fPath release];
|
||||
if (fLocation)
|
||||
[fLocation release];
|
||||
|
||||
if (fInfo)
|
||||
|
||||
@@ -74,9 +74,7 @@
|
||||
{
|
||||
[fBackBadge release];
|
||||
|
||||
if (fBadge)
|
||||
[fBadge release];
|
||||
if (fAppIcon)
|
||||
[fAppIcon release];
|
||||
|
||||
[fMainLineAttributes release];
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
|
||||
- (void) setBackgroundImage: (NSImage *) image
|
||||
{
|
||||
if (fBackgroundColor)
|
||||
[fBackgroundColor release];
|
||||
fBackgroundColor = [[NSColor colorWithPatternImage: image] retain];
|
||||
|
||||
@@ -37,7 +36,6 @@
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
if (fBackgroundColor)
|
||||
[fBackgroundColor release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
@@ -115,11 +115,8 @@
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
if (fTorrents)
|
||||
[fTorrents release];
|
||||
if (fPeers)
|
||||
[fPeers release];
|
||||
if (fFiles)
|
||||
[fFiles release];
|
||||
|
||||
[super dealloc];
|
||||
@@ -127,7 +124,6 @@
|
||||
|
||||
- (void) updateInfoForTorrents: (NSArray *) torrents
|
||||
{
|
||||
if (fTorrents)
|
||||
[fTorrents release];
|
||||
fTorrents = [torrents retain];
|
||||
|
||||
@@ -286,7 +282,6 @@
|
||||
|
||||
//set file table
|
||||
[fFileOutline deselectAll: nil];
|
||||
if (fFiles)
|
||||
[fFiles release];
|
||||
fFiles = [[torrent fileList] retain];
|
||||
|
||||
@@ -435,7 +430,6 @@
|
||||
[fDownloadingFromField setStringValue: active ? [NSString stringWithInt: [torrent peersSendingToUs]] : @""];
|
||||
[fUploadingToField setStringValue: active ? [NSString stringWithInt: [torrent peersGettingFromUs]] : @""];
|
||||
|
||||
if (fPeers)
|
||||
[fPeers release];
|
||||
fPeers = [[[torrent peers] sortedArrayUsingDescriptors: [self peerSortDescriptors]] retain];
|
||||
|
||||
|
||||
+11
-9
@@ -151,21 +151,14 @@
|
||||
[fGreen2Piece release];
|
||||
[fGreen3Piece release];
|
||||
|
||||
if (fTorrent)
|
||||
[fTorrent release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void) setTorrent: (Torrent *) torrent
|
||||
{
|
||||
if (fTorrent)
|
||||
{
|
||||
[fTorrent release];
|
||||
|
||||
if (!torrent)
|
||||
fTorrent = nil;
|
||||
}
|
||||
|
||||
if (torrent)
|
||||
{
|
||||
fTorrent = [torrent retain];
|
||||
@@ -192,7 +185,12 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
[self setImage: [[fBack copy] autorelease]];
|
||||
fTorrent = nil;
|
||||
|
||||
NSImage * newBack = [fBack copy];
|
||||
[self setImage: newBack];
|
||||
[newBack release];
|
||||
|
||||
[self setNeedsDisplay];
|
||||
}
|
||||
}
|
||||
@@ -203,7 +201,11 @@
|
||||
return;
|
||||
|
||||
if (first)
|
||||
[self setImage: [[fBack copy] autorelease]];
|
||||
{
|
||||
NSImage * newBack = [fBack copy];
|
||||
[self setImage: newBack];
|
||||
[newBack release];
|
||||
}
|
||||
NSImage * image = [self image];
|
||||
|
||||
int8_t * pieces;
|
||||
|
||||
Reference in New Issue
Block a user