From cb14ec144cf79035e93a8c036eca57f9d39b896a Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Thu, 20 Jun 2002 22:13:39 +0000 Subject: [PATCH] Use IntListUtil. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1516 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../whirled/spot/server/RuntimeSpotSceneImpl.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/java/com/threerings/whirled/spot/server/RuntimeSpotSceneImpl.java b/src/java/com/threerings/whirled/spot/server/RuntimeSpotSceneImpl.java index 01dcd34fb..bf0cd4a4a 100644 --- a/src/java/com/threerings/whirled/spot/server/RuntimeSpotSceneImpl.java +++ b/src/java/com/threerings/whirled/spot/server/RuntimeSpotSceneImpl.java @@ -1,8 +1,10 @@ // -// $Id: RuntimeSpotSceneImpl.java,v 1.3 2002/04/17 00:16:34 mdb Exp $ +// $Id: RuntimeSpotSceneImpl.java,v 1.4 2002/06/20 22:13:39 mdb Exp $ package com.threerings.whirled.spot.server; +import com.samskivert.util.IntListUtil; + import com.threerings.crowd.data.PlaceConfig; import com.threerings.whirled.server.RuntimeSceneImpl; @@ -53,13 +55,7 @@ public class RuntimeSpotSceneImpl extends RuntimeSceneImpl // documentation inherited public int getLocationIndex (int locationId) { - int lcount = _model.locationIds.length; - for (int i = 0; i < lcount; i++) { - if (_model.locationIds[i] == locationId) { - return i; - } - } - return -1; + return IntListUtil.indexOf(_model.locationIds, locationId); } // documentation inherited