From d18e1590a8a13a231f45044a2dbfd23af6be2eb9 Mon Sep 17 00:00:00 2001 From: Charlie Groves Date: Thu, 2 Jun 2011 17:30:51 +0000 Subject: [PATCH] We've already checked the type of the required service, so don't require another cast git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6647 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/main/as/com/threerings/presents/client/Client.as | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/as/com/threerings/presents/client/Client.as b/src/main/as/com/threerings/presents/client/Client.as index 5e870214b..18e48fd0b 100644 --- a/src/main/as/com/threerings/presents/client/Client.as +++ b/src/main/as/com/threerings/presents/client/Client.as @@ -202,7 +202,7 @@ public class Client extends EventDispatcher } } - public function getService (clazz :Class) :InvocationService + public function getService (clazz :Class) :* { if (_bstrap != null) { for each (var isvc :InvocationService in _bstrap.services) { @@ -211,12 +211,12 @@ public class Client extends EventDispatcher } } } - return null; } - public function requireService (clazz :Class) :InvocationService + public function requireService (clazz :Class) :* { + var isvc :InvocationService = getService(clazz); if (isvc == null) { throw new Error(clazz + " isn't available. I can't bear to go on.");