adium 3005:823d4c46e01a: Instead of iterating and ptr comparison...

commits at adium.im commits at adium.im
Tue Dec 1 00:55:01 UTC 2009


details:	http://hg.adium.im/adium/rev/823d4c46e01a
revision:	3005:823d4c46e01a
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.
(transplanted from b50d42c93fe09b8917597cde3a7e8790a0292778)

diffs (21 lines):

diff -r 198a6be4cc12 -r 823d4c46e01a Frameworks/Adium Framework/Source/AIAuthorizationRequestsWindowController.m
--- a/Frameworks/Adium Framework/Source/AIAuthorizationRequestsWindowController.m	Mon Nov 30 18:05:33 2009 -0600
+++ 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