------------------------------------------------------------ revno: 259 committer: Seif Lotfy <s...@lotfy.com> branch nick: bluebird timestamp: Sat 2011-09-17 23:20:32 +0200 message: move connections.lookup (peer) outside the loop modified: src/notify.vala
-- lp:~zeitgeist/zeitgeist/bluebird https://code.launchpad.net/~zeitgeist/zeitgeist/bluebird Your team Zeitgeist Framework Team is subscribed to branch lp:~zeitgeist/zeitgeist/bluebird. To unsubscribe from this branch go to https://code.launchpad.net/~zeitgeist/zeitgeist/bluebird/+edit-subscription
=== modified file 'src/notify.vala' --- src/notify.vala 2011-09-17 20:55:02 +0000 +++ src/notify.vala 2011-09-17 21:20:32 +0000 @@ -28,7 +28,6 @@ private HashTable<string, Monitor> monitors; private HashTable<string, GenericArray<string>> connections; - string[] peers; construct { @@ -188,11 +187,12 @@ if (connections.lookup (peer) != null) { - for (int i = 0; i < connections.lookup (peer).length; i++) + var peers = connections.lookup (peer) + for (int i = 0; i < peers.length; i++) { - if (connections.lookup (peer)[i] == object_path) + if (peers[i] == object_path) { - connections.lookup (peer).remove_index (i); + peers.remove_index (i); break; } }
_______________________________________________ Mailing list: https://launchpad.net/~zeitgeist Post to : zeitgeist@lists.launchpad.net Unsubscribe : https://launchpad.net/~zeitgeist More help : https://help.launchpad.net/ListHelp