Utilize Util.equals() to compare ByteArrays.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5357 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2008-09-04 22:20:20 +00:00
parent 08522d513a
commit 6179c74b29
+1 -12
View File
@@ -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);
}
}
}