From 6179c74b29a541ca2431e0e750dbc68b6a64ae98 Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Thu, 4 Sep 2008 22:20:20 +0000 Subject: [PATCH] Utilize Util.equals() to compare ByteArrays. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5357 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/as/com/threerings/util/Long.as | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/as/com/threerings/util/Long.as b/src/as/com/threerings/util/Long.as index 313eb26c5..3473a8dcc 100644 --- a/src/as/com/threerings/util/Long.as +++ b/src/as/com/threerings/util/Long.as @@ -98,18 +98,7 @@ public class Long // from Equalable public function equals (other :Object) :Boolean { - var that :Long = (other as Long); - if (that == null || this.bytes.length != 8 || that.bytes.length != 8) { - return false; - } - - // byte-wise comparison - for (var ii :int = 0; ii < 8; ii++) { - if (this.bytes[ii] != that.bytes[ii]) { - return false; - } - } - return true; + return (other is Long) && Util.equals(this.bytes, Long(other).bytes); } } }