adium-1.4 2855:b50d42c93fe0: Instead of iterating and ptr compar...

commits at adium.im commits at adium.im
Tue Dec 1 00:54:28 UTC 2009


details:	http://hg.adium.im/adium-1.4/rev/b50d42c93fe0
revision:	2855:b50d42c93fe0
author:		Zachary West <zacw at adium.im>
date:		Mon Nov 30 19:54:22 2009 -0500

Instead of iterating and ptr comparisoning to remove, just.. uh.. remove.

I have no idea what I was thinking when I wrote this. Must have modified existing code and not read it twice.

diffs (21 lines):

diff -r aa9b93583f52 -r b50d42c93fe0 Frameworks/Adium Framework/Source/AIAuthorizationRequestsWindowController.m
--- a/Frameworks/Adium Framework/Source/AIAuthorizationRequestsWindowController.m	Mon Nov 30 15:28:02 2009 -0800
+++ b/Frameworks/Adium Framework/Source/AIAuthorizationRequestsWindowController.m	Mon Nov 30 19:54:22 2009 -0500
@@ -309,15 +309,11 @@
 /*!
  * @brief Remove requests for a given account
  *
- * Called in the case of, for example, an account going offline. Returns the dict removed.
+ * Called in the case of, for example, an account going offline.
  */
 - (void)removeRequest:(id)request
 {
-	for (NSDictionary *dict in [[requests mutableCopy] autorelease]) {
-		if (dict == request) {
-			[requests removeObject:dict];
-		}
-	}
+	[requests removeObject:request];
 
 	[self reloadData];
 }




More information about the commits mailing list