Various cleanuppery.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4118 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -192,7 +192,6 @@ public class PlaceObject extends DObject
|
||||
public override function readObject (ins :ObjectInputStream) :void
|
||||
{
|
||||
super.readObject(ins);
|
||||
// TODO: this needs fixing!
|
||||
occupants = (ins.readObject() as OidList);
|
||||
occupantInfo = (ins.readObject() as DSet);
|
||||
speakService = (ins.readObject() as SpeakMarshaller);
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.threerings.io {
|
||||
import flash.utils.ByteArray;
|
||||
|
||||
import com.threerings.util.ClassUtil;
|
||||
import com.threerings.util.SimpleMap;
|
||||
|
||||
import com.threerings.io.streamers.ArrayStreamer;
|
||||
import com.threerings.io.streamers.ByteStreamer;
|
||||
@@ -147,7 +146,7 @@ public class Streamer
|
||||
if (_streamers == null) {
|
||||
_streamers = [
|
||||
new StringStreamer(),
|
||||
new ArrayStreamer("[Ljava.lang.Object;"),
|
||||
new ArrayStreamer(),
|
||||
new NumberStreamer(),
|
||||
new ByteArrayStreamer(),
|
||||
new ByteStreamer(),
|
||||
|
||||
@@ -14,7 +14,7 @@ import com.threerings.presents.Log;
|
||||
*/
|
||||
public class ArrayStreamer extends Streamer
|
||||
{
|
||||
public function ArrayStreamer (jname :String)
|
||||
public function ArrayStreamer (jname :String = "[Ljava.lang.Object;")
|
||||
{
|
||||
super(TypedArray, jname);
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.threerings.io.ObjectOutputStream;
|
||||
import com.threerings.io.Streamable;
|
||||
|
||||
public class Name extends Object
|
||||
implements Equalable, Streamable
|
||||
implements Hashable, Streamable
|
||||
{
|
||||
public function Name (name :String = "")
|
||||
{
|
||||
@@ -37,13 +37,24 @@ public class Name extends Object
|
||||
return _name;
|
||||
}
|
||||
|
||||
// documentation inherited from interface Equalable
|
||||
// documentation inherited from interface Hashable
|
||||
public function equals (other :Object) :Boolean
|
||||
{
|
||||
return (other is Name) &&
|
||||
(getNormal() === (other as Name).getNormal());
|
||||
}
|
||||
|
||||
// documentation inherited from interface Hashable
|
||||
public function hashCode () :int
|
||||
{
|
||||
var norm :String = getNormal();
|
||||
var hash :int = 0;
|
||||
for (var ii :int = 0; ii < norm.length; ii++) {
|
||||
hash = (hash << 1) ^ int(norm.charCodeAt(ii));
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
// documentation inherited from interface Streamable
|
||||
public function writeObject (out :ObjectOutputStream) :void
|
||||
//throws IOError
|
||||
|
||||
Reference in New Issue
Block a user