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
|
public override function readObject (ins :ObjectInputStream) :void
|
||||||
{
|
{
|
||||||
super.readObject(ins);
|
super.readObject(ins);
|
||||||
// TODO: this needs fixing!
|
|
||||||
occupants = (ins.readObject() as OidList);
|
occupants = (ins.readObject() as OidList);
|
||||||
occupantInfo = (ins.readObject() as DSet);
|
occupantInfo = (ins.readObject() as DSet);
|
||||||
speakService = (ins.readObject() as SpeakMarshaller);
|
speakService = (ins.readObject() as SpeakMarshaller);
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ package com.threerings.io {
|
|||||||
import flash.utils.ByteArray;
|
import flash.utils.ByteArray;
|
||||||
|
|
||||||
import com.threerings.util.ClassUtil;
|
import com.threerings.util.ClassUtil;
|
||||||
import com.threerings.util.SimpleMap;
|
|
||||||
|
|
||||||
import com.threerings.io.streamers.ArrayStreamer;
|
import com.threerings.io.streamers.ArrayStreamer;
|
||||||
import com.threerings.io.streamers.ByteStreamer;
|
import com.threerings.io.streamers.ByteStreamer;
|
||||||
@@ -147,7 +146,7 @@ public class Streamer
|
|||||||
if (_streamers == null) {
|
if (_streamers == null) {
|
||||||
_streamers = [
|
_streamers = [
|
||||||
new StringStreamer(),
|
new StringStreamer(),
|
||||||
new ArrayStreamer("[Ljava.lang.Object;"),
|
new ArrayStreamer(),
|
||||||
new NumberStreamer(),
|
new NumberStreamer(),
|
||||||
new ByteArrayStreamer(),
|
new ByteArrayStreamer(),
|
||||||
new ByteStreamer(),
|
new ByteStreamer(),
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import com.threerings.presents.Log;
|
|||||||
*/
|
*/
|
||||||
public class ArrayStreamer extends Streamer
|
public class ArrayStreamer extends Streamer
|
||||||
{
|
{
|
||||||
public function ArrayStreamer (jname :String)
|
public function ArrayStreamer (jname :String = "[Ljava.lang.Object;")
|
||||||
{
|
{
|
||||||
super(TypedArray, jname);
|
super(TypedArray, jname);
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import com.threerings.io.ObjectOutputStream;
|
|||||||
import com.threerings.io.Streamable;
|
import com.threerings.io.Streamable;
|
||||||
|
|
||||||
public class Name extends Object
|
public class Name extends Object
|
||||||
implements Equalable, Streamable
|
implements Hashable, Streamable
|
||||||
{
|
{
|
||||||
public function Name (name :String = "")
|
public function Name (name :String = "")
|
||||||
{
|
{
|
||||||
@@ -37,13 +37,24 @@ public class Name extends Object
|
|||||||
return _name;
|
return _name;
|
||||||
}
|
}
|
||||||
|
|
||||||
// documentation inherited from interface Equalable
|
// documentation inherited from interface Hashable
|
||||||
public function equals (other :Object) :Boolean
|
public function equals (other :Object) :Boolean
|
||||||
{
|
{
|
||||||
return (other is Name) &&
|
return (other is Name) &&
|
||||||
(getNormal() === (other as Name).getNormal());
|
(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
|
// documentation inherited from interface Streamable
|
||||||
public function writeObject (out :ObjectOutputStream) :void
|
public function writeObject (out :ObjectOutputStream) :void
|
||||||
//throws IOError
|
//throws IOError
|
||||||
|
|||||||
Reference in New Issue
Block a user