adium/adium

Remove redundant casts.

2013-06-02, Frank Dowsett
47db4a69f78e
Parents 56f9652ebff0
Children d1ec812f2847
Remove redundant casts.
--- a/Frameworks/AIUtilities Framework/Source/AISystemNetworkDefaults.m Sun Jun 02 11:34:28 2013 -0400
+++ b/Frameworks/AIUtilities Framework/Source/AISystemNetworkDefaults.m Sun Jun 02 11:36:07 2013 -0400
@@ -120,9 +120,9 @@
} else {
//Check for a PAC configuration
- enable = [[proxyDict objectForKey:(NSString *)kSCPropNetProxiesProxyAutoConfigEnable] boolValue];
+ enable = [[proxyDict objectForKey:kSCPropNetProxiesProxyAutoConfigEnable] boolValue];
if (enable) {
- NSString *pacFile = [proxyDict objectForKey:(NSString *)kSCPropNetProxiesProxyAutoConfigURLString];
+ NSString *pacFile = [proxyDict objectForKey:kSCPropNetProxiesProxyAutoConfigURLString];
if (pacFile) {
CFURLRef url = (__bridge CFURLRef)[NSURL URLWithString:[NSString stringWithFormat:@"http://%@", hostName ?: @"google.com"]];
--- a/Frameworks/Adium Framework/Source/AIAddressBookController.m Sun Jun 02 11:34:28 2013 -0400
+++ b/Frameworks/Adium Framework/Source/AIAddressBookController.m Sun Jun 02 11:36:07 2013 -0400
@@ -814,7 +814,7 @@
if ([[homepage scheme] isEqualToString:@"fb"]) {
//Retrieve all appropriate contacts
//This will be fb://profile/XXX where XXX is the UID
- NSString *facebookNumber = (NSString*)[(NSString*)homepage lastPathComponent];
+ NSString *facebookNumber = [homepage lastPathComponent];
NSString *facebookUID = [NSString stringWithFormat:@"-%@@chat.facebook.com", facebookNumber];
NSSet *contacts = [adium.contactController allContactsWithService:[adium.accountController firstServiceWithServiceID:@"Facebook"]
@@ -1190,7 +1190,7 @@
if ([[homepage scheme] isEqualToString:@"fb"]) {
//Retrieve all appropriate contacts
//This will be fb://profile/XXX where XXX is the UID
- NSString *facebookNumber = (NSString*)[(NSString*)homepage lastPathComponent];
+ NSString *facebookNumber = [homepage lastPathComponent];
NSString *facebookUID = [NSString stringWithFormat:@"-%@@chat.facebook.com", facebookNumber];
if (!(dict = [addressBookDict objectForKey:@"Facebook"])) {
dict = [[NSMutableDictionary alloc] init];
--- a/Frameworks/Adium Framework/Source/AIContextMenuTextView.m Sun Jun 02 11:34:28 2013 -0400
+++ b/Frameworks/Adium Framework/Source/AIContextMenuTextView.m Sun Jun 02 11:36:07 2013 -0400
@@ -65,7 +65,7 @@
if ([itemsArray count] > 0) {
[contextualMenu addItem:[NSMenuItem separatorItem]];
- NSInteger i = [(NSMenu *)contextualMenu numberOfItems];
+ NSInteger i = [contextualMenu numberOfItems];
for (menuItem in itemsArray) {
//We're going to be copying; call menu needs update now since it won't be called later.
NSMenu *submenu = [menuItem submenu];
--- a/Frameworks/Adium Framework/Source/AIMessageEntryTextView.m Sun Jun 02 11:34:28 2013 -0400
+++ b/Frameworks/Adium Framework/Source/AIMessageEntryTextView.m Sun Jun 02 11:36:07 2013 -0400
@@ -1268,7 +1268,7 @@
if ([itemsArray count] > 0) {
[contextualMenu addItem:[NSMenuItem separatorItem]];
- NSInteger i = [(NSMenu *)contextualMenu numberOfItems];
+ NSInteger i = [contextualMenu numberOfItems];
for (NSMenuItem *menuItem in itemsArray) {
// We're going to be copying; call menu needs update now since it won't be called later.
--- a/Other/Adium Spotlight Importer/GetMetadataForFile.m Sun Jun 02 11:34:28 2013 -0400
+++ b/Other/Adium Spotlight Importer/GetMetadataForFile.m Sun Jun 02 11:36:07 2013 -0400
@@ -170,7 +170,7 @@
Boolean ret = YES;
NSXMLDocument *xmlDoc = nil;
NSError *err=nil;
- NSURL *furl = [NSURL fileURLWithPath:(NSString *)pathToFile];
+ NSURL *furl = [NSURL fileURLWithPath:pathToFile];
NSData *data = [NSData dataWithContentsOfURL:furl options:NSUncachedRead error:&err];
if (data) {
xmlDoc = [[NSXMLDocument alloc] initWithData:data options:NSXMLNodePreserveCDATA error:&err];
--- a/Plugins/Send Message Contact Alert/ESSendMessageAlertDetailPane.m Sun Jun 02 11:34:28 2013 -0400
+++ b/Plugins/Send Message Contact Alert/ESSendMessageAlertDetailPane.m Sun Jun 02 11:36:07 2013 -0400
@@ -143,7 +143,7 @@
//NSPopUpButton doesn't handle submenus well at all. We put a blank menu item at the top of our
//menu when we created it. We can now change its attributes to affect the way the unclicked button
//displays.
- firstMenuItem = (NSMenuItem *)[[popUp_messageTo menu] itemAtIndex:0];
+ firstMenuItem = [[popUp_messageTo menu] itemAtIndex:0];
[firstMenuItem setTitle:([toContact isKindOfClass:[AIMetaContact class]] ?
toContact.displayName :
toContact.formattedUID)];
--- a/Plugins/WebKit Message View/AIWebkitMessageViewStyle.m Sun Jun 02 11:34:28 2013 -0400
+++ b/Plugins/WebKit Message View/AIWebkitMessageViewStyle.m Sun Jun 02 11:36:07 2013 -0400
@@ -1327,7 +1327,7 @@
}
//Replace the body background tag
- [inString safeReplaceCharactersInRange:range withString:(bodyTag ? (NSString *)bodyTag : @"")];
+ [inString safeReplaceCharactersInRange:range withString:(bodyTag ? bodyTag : @"")];
}
}
--- a/Source/AILogViewerWindowController.m Sun Jun 02 11:34:28 2013 -0400
+++ b/Source/AILogViewerWindowController.m Sun Jun 02 11:36:07 2013 -0400
@@ -1610,7 +1610,7 @@
if (!logPath)
AILogWithSignature(@"Could not get path for %@. ", url);
- NSArray *pathComponents = [(NSString *)logPath pathComponents];
+ NSArray *pathComponents = [logPath pathComponents];
/* Handle chatlogs-as-bundles, which have an xml file inside our target .chatlog path */
if ([[[pathComponents lastObject] pathExtension] caseInsensitiveCompare:@"xml"] == NSOrderedSame)
--- a/Source/ESGlobalEventsPreferences.m Sun Jun 02 11:34:28 2013 -0400
+++ b/Source/ESGlobalEventsPreferences.m Sun Jun 02 11:36:07 2013 -0400
@@ -450,13 +450,13 @@
if (![alertsArray count]) {
//We can select "None" if there are no sounds
- soundMenuItem = (NSMenuItem *)[popUp_soundSet itemWithTitle:@"None"];
+ soundMenuItem = [popUp_soundSet itemWithTitle:@"None"];
} else {
/* Otherwise, check to see if we remain in our proper soundset.
* Note that this won't detect if we return to a soundset, but that'd be an expensive search.
*/
- soundMenuItem = (NSMenuItem *)[popUp_soundSet selectedItem];
+ soundMenuItem = [popUp_soundSet selectedItem];
AISoundSet *soundSet = [soundMenuItem representedObject];
NSString *key;