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
This commit is contained in:
@@ -202,7 +202,7 @@ public class Client extends EventDispatcher
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getService (clazz :Class) :InvocationService
|
public function getService (clazz :Class) :*
|
||||||
{
|
{
|
||||||
if (_bstrap != null) {
|
if (_bstrap != null) {
|
||||||
for each (var isvc :InvocationService in _bstrap.services) {
|
for each (var isvc :InvocationService in _bstrap.services) {
|
||||||
@@ -211,12 +211,12 @@ public class Client extends EventDispatcher
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function requireService (clazz :Class) :InvocationService
|
public function requireService (clazz :Class) :*
|
||||||
{
|
{
|
||||||
|
|
||||||
var isvc :InvocationService = getService(clazz);
|
var isvc :InvocationService = getService(clazz);
|
||||||
if (isvc == null) {
|
if (isvc == null) {
|
||||||
throw new Error(clazz + " isn't available. I can't bear to go on.");
|
throw new Error(clazz + " isn't available. I can't bear to go on.");
|
||||||
|
|||||||
Reference in New Issue
Block a user