warnings--; miscellaneous other cleanup
This commit is contained in:
parent
28ce3a64e8
commit
cd7b38e007
|
@ -2065,9 +2065,7 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
|
|||
}
|
||||
|
||||
[fTableView selectValues: selectedValues];
|
||||
#warning still happens anyway?
|
||||
//removed because it made the inspector reset (noticeable when a transfer with web seeds is selected)
|
||||
//[self resetInfo]; //if group is already selected, but the torrents in it change
|
||||
[self resetInfo]; //if group is already selected, but the torrents in it change
|
||||
|
||||
[self setBottomCountText: groupRows || filterStatus || filterGroup || filterText];
|
||||
|
||||
|
|
|
@ -233,9 +233,9 @@
|
|||
if (!fAttributes)
|
||||
fAttributes = [[[[column dataCell] attributedStringValue] attributesAtIndex: 0 effectiveRange: NULL] retain];
|
||||
|
||||
CGFloat count = floorf([[[fMessages objectAtIndex: row] objectForKey: @"Message"] sizeWithAttributes: fAttributes].width
|
||||
/ [column width]);
|
||||
return [tableView rowHeight] * (count + 1.0f);
|
||||
const CGFloat count = floorf([[[fMessages objectAtIndex: row] objectForKey: @"Message"] sizeWithAttributes: fAttributes].width
|
||||
/ [column width]);
|
||||
return [tableView rowHeight] * (count + 1.0);
|
||||
}
|
||||
|
||||
- (void) tableView: (NSTableView *) tableView sortDescriptorsDidChange: (NSArray *) oldDescriptors
|
||||
|
|
|
@ -434,14 +434,14 @@ tr_session * fHandle;
|
|||
|
||||
- (void) setPeersGlobal: (id) sender
|
||||
{
|
||||
int count = [sender intValue];
|
||||
const int count = [sender intValue];
|
||||
[fDefaults setInteger: count forKey: @"PeersTotal"];
|
||||
tr_sessionSetPeerLimit(fHandle, count);
|
||||
}
|
||||
|
||||
- (void) setPeersTorrent: (id) sender
|
||||
{
|
||||
int count = [sender intValue];
|
||||
const int count = [sender intValue];
|
||||
[fDefaults setInteger: count forKey: @"PeersTorrent"];
|
||||
}
|
||||
|
||||
|
@ -452,13 +452,14 @@ tr_session * fHandle;
|
|||
|
||||
- (void) setEncryptionMode: (id) sender
|
||||
{
|
||||
tr_sessionSetEncryption(fHandle, [fDefaults boolForKey: @"EncryptionPrefer"] ?
|
||||
([fDefaults boolForKey: @"EncryptionRequire"] ? TR_ENCRYPTION_REQUIRED : TR_ENCRYPTION_PREFERRED) : TR_CLEAR_PREFERRED);
|
||||
const tr_encryption_mode mode = [fDefaults boolForKey: @"EncryptionPrefer"] ?
|
||||
([fDefaults boolForKey: @"EncryptionRequire"] ? TR_ENCRYPTION_REQUIRED : TR_ENCRYPTION_PREFERRED) : TR_CLEAR_PREFERRED;
|
||||
tr_sessionSetEncryption(fHandle, mode);
|
||||
}
|
||||
|
||||
- (void) setBlocklistEnabled: (id) sender
|
||||
{
|
||||
BOOL enable = [sender state] == NSOnState;
|
||||
const BOOL enable = [sender state] == NSOnState;
|
||||
[fDefaults setBool: enable forKey: @"Blocklist"];
|
||||
tr_blocklistSetEnabled(fHandle, enable);
|
||||
|
||||
|
|
|
@ -777,6 +777,7 @@ int trashDataFile(const char * filename)
|
|||
return allTrackers;
|
||||
}
|
||||
|
||||
//used by auto group rules
|
||||
- (NSString *) trackerList
|
||||
{
|
||||
return [[self allTrackers: NO] componentsJoinedByString: @"\n"];
|
||||
|
@ -1431,7 +1432,7 @@ int trashDataFile(const char * filename)
|
|||
for (NSInteger index = [indexSet firstIndex]; index != NSNotFound; index = [indexSet indexGreaterThanIndex: index])
|
||||
have += fFileStat[index].bytesCompleted;
|
||||
|
||||
NSAssert([node size], @"director in torrent file has size 0");
|
||||
NSAssert([node size], @"directory in torrent file has size 0");
|
||||
return (CGFloat)have / [node size];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue