From 2a6940363d1dc8dc5d4097007ad7621023ad6cb6 Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Tue, 4 Nov 2008 21:42:18 +0000 Subject: [PATCH] Rollback r5502. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5503 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/as/com/threerings/util/ExpiringSet.as | 4 ++-- src/as/com/threerings/util/HashMap.as | 6 +++--- src/as/com/threerings/util/HashSet.as | 4 ++-- src/as/com/threerings/util/Map.as | 2 +- src/as/com/threerings/util/Set.as | 2 +- src/as/com/threerings/util/SortedHashMap.as | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/as/com/threerings/util/ExpiringSet.as b/src/as/com/threerings/util/ExpiringSet.as index dc94422dd..3e5c6ec45 100644 --- a/src/as/com/threerings/util/ExpiringSet.as +++ b/src/as/com/threerings/util/ExpiringSet.as @@ -63,10 +63,10 @@ public class ExpiringSet extends EventDispatcher } // from Set - public function forEach (fn :Function, thisObject :* = null) :void + public function forEach (fn :Function) :void { for each (var e :ExpiringElement in _data) { - fn.call(thisObject, e); + fn(e); } } diff --git a/src/as/com/threerings/util/HashMap.as b/src/as/com/threerings/util/HashMap.as index 8350ac9cb..14010e9b8 100644 --- a/src/as/com/threerings/util/HashMap.as +++ b/src/as/com/threerings/util/HashMap.as @@ -263,11 +263,11 @@ public class HashMap } /** @inheritDoc */ - public function forEach (fn :Function, thisObject :* = null) :void + public function forEach (fn :Function) :void { if (_simpleData != null) { for (var key :Object in _simpleData) { - fn.call(thisObject, key, _simpleData[key]); + fn(key, _simpleData[key]); } } @@ -275,7 +275,7 @@ public class HashMap for (var ii :int = _entries.length - 1; ii >= 0; ii--) { for (var e :Entry = (_entries[ii] as Entry); e != null; e = e.next) { - fn.call(thisObject, e.getOriginalKey(), e.value); + fn(e.getOriginalKey(), e.value); } } } diff --git a/src/as/com/threerings/util/HashSet.as b/src/as/com/threerings/util/HashSet.as index 60b084659..99e4f722b 100644 --- a/src/as/com/threerings/util/HashSet.as +++ b/src/as/com/threerings/util/HashSet.as @@ -76,10 +76,10 @@ public class HashSet return (_hashMap.containsKey(o)); } - public function forEach (fn :Function, thisObject :* = null) :void + public function forEach (fn :Function) :void { _hashMap.forEach(function (key :Object, val :Object) :void { - fn.call(thisObject, key); + fn(key); }); } diff --git a/src/as/com/threerings/util/Map.as b/src/as/com/threerings/util/Map.as index 1454cb505..cf32b6513 100644 --- a/src/as/com/threerings/util/Map.as +++ b/src/as/com/threerings/util/Map.as @@ -46,7 +46,7 @@ public interface Map * Call the specified function, which accepts two args: key and value, * for every mapping. */ - function forEach (fn :Function, thisObject :* = null) :void; + function forEach (fn :Function) :void; /** * Returns true if this map contains no elements. diff --git a/src/as/com/threerings/util/Set.as b/src/as/com/threerings/util/Set.as index cfc95c9a4..e527c8aa8 100644 --- a/src/as/com/threerings/util/Set.as +++ b/src/as/com/threerings/util/Set.as @@ -42,7 +42,7 @@ public interface Set function contains (o :Object) :Boolean; /** Call the specified function, which accepts an element as an argument. */ - function forEach (fn :Function, thisObject :* = null) :void; + function forEach (fn :Function) :void; /** Retuns the number of elements in this set. */ function size () :int; // @TSC - should this be uint? diff --git a/src/as/com/threerings/util/SortedHashMap.as b/src/as/com/threerings/util/SortedHashMap.as index 87ea1898a..4e41f5eeb 100644 --- a/src/as/com/threerings/util/SortedHashMap.as +++ b/src/as/com/threerings/util/SortedHashMap.as @@ -77,11 +77,11 @@ public class SortedHashMap extends HashMap return vals; } - override public function forEach (fn :Function, thisObject :* = null) :void + override public function forEach (fn :Function) :void { var keys :Array = keys(); for each (var key :Object in keys) { - fn.call(thisObject, key, get(key)); + fn(key, get(key)); } }