From cd9126b55cc72ea98171bf884df30178743ce027 Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Wed, 23 Apr 2008 17:32:38 +0000 Subject: [PATCH] - Proper casting. - Handle the common case first. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5013 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../threerings/presents/client/ClientDObjectMgr.as | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/as/com/threerings/presents/client/ClientDObjectMgr.as b/src/as/com/threerings/presents/client/ClientDObjectMgr.as index aaefa01a3..692efe8a7 100644 --- a/src/as/com/threerings/presents/client/ClientDObjectMgr.as +++ b/src/as/com/threerings/presents/client/ClientDObjectMgr.as @@ -181,19 +181,19 @@ public class ClientDObjectMgr var obj :Object = _actions.shift(); // do the proper thing depending on the object - if (obj is BootstrapNotification) { - _client.gotBootstrap(obj.getData(), this); - - } else if (obj is EventNotification) { - var evt :DEvent = obj.getEvent(); + if (obj is EventNotification) { + var evt :DEvent = (obj as EventNotification).getEvent(); // log.info("Dispatch event: " + evt); dispatchEvent(evt); + } else if (obj is BootstrapNotification) { + _client.gotBootstrap((obj as BootstrapNotification).getData(), this); + } else if (obj is ObjectResponse) { registerObjectAndNotify((obj as ObjectResponse).getObject()); } else if (obj is UnsubscribeResponse) { - var oid :int = obj.getOid(); + var oid :int = (obj as UnsubscribeResponse).getOid(); if (_dead.remove(oid) == null) { log.warning("Received unsub ACK from unknown object [oid=" + oid + "]."); }