Nixed a bunch of redundant casts.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@304 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
@@ -147,7 +147,7 @@ public class SimpleMisoSceneModel extends MisoSceneModel
|
||||
public boolean addObject (ObjectInfo info)
|
||||
{
|
||||
if (info.isInteresting()) {
|
||||
objectInfo = (ObjectInfo[])ArrayUtil.append(objectInfo, info);
|
||||
objectInfo = ArrayUtil.append(objectInfo, info);
|
||||
} else {
|
||||
objectTileIds = ArrayUtil.append(objectTileIds, info.tileId);
|
||||
objectXs = ArrayUtil.append(objectXs, (short)info.x);
|
||||
@@ -170,7 +170,7 @@ public class SimpleMisoSceneModel extends MisoSceneModel
|
||||
// look for it in the interesting info array
|
||||
int oidx = ListUtil.indexOf(objectInfo, info);
|
||||
if (oidx != -1) {
|
||||
objectInfo = (ObjectInfo[])ArrayUtil.splice(objectInfo, oidx, 1);
|
||||
objectInfo = ArrayUtil.splice(objectInfo, oidx, 1);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -190,11 +190,11 @@ public class SimpleMisoSceneModel extends MisoSceneModel
|
||||
public Object clone ()
|
||||
{
|
||||
SimpleMisoSceneModel model = (SimpleMisoSceneModel)super.clone();
|
||||
model.baseTileIds = (int[])baseTileIds.clone();
|
||||
model.objectTileIds = (int[])objectTileIds.clone();
|
||||
model.objectXs = (short[])objectXs.clone();
|
||||
model.objectYs = (short[])objectYs.clone();
|
||||
model.objectInfo = (ObjectInfo[])objectInfo.clone();
|
||||
model.baseTileIds = baseTileIds.clone();
|
||||
model.objectTileIds = objectTileIds.clone();
|
||||
model.objectXs = objectXs.clone();
|
||||
model.objectYs = objectYs.clone();
|
||||
model.objectInfo = objectInfo.clone();
|
||||
return model;
|
||||
}
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ public class SparseMisoSceneModel extends MisoSceneModel
|
||||
}
|
||||
|
||||
if (info.isInteresting()) {
|
||||
objectInfo = (ObjectInfo[])ArrayUtil.append(objectInfo, info);
|
||||
objectInfo = ArrayUtil.append(objectInfo, info);
|
||||
} else {
|
||||
objectTileIds = ArrayUtil.append(objectTileIds, info.tileId);
|
||||
objectXs = ArrayUtil.append(objectXs, (short)info.x);
|
||||
@@ -144,8 +144,7 @@ public class SparseMisoSceneModel extends MisoSceneModel
|
||||
// look for it in the interesting info array
|
||||
int oidx = ListUtil.indexOf(objectInfo, info);
|
||||
if (oidx != -1) {
|
||||
objectInfo = (ObjectInfo[])
|
||||
ArrayUtil.splice(objectInfo, oidx, 1);
|
||||
objectInfo = ArrayUtil.splice(objectInfo, oidx, 1);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -216,11 +215,11 @@ public class SparseMisoSceneModel extends MisoSceneModel
|
||||
public Object clone () {
|
||||
try {
|
||||
Section section = (Section)super.clone();
|
||||
section.baseTileIds = (int[])baseTileIds.clone();
|
||||
section.objectTileIds = (int[])objectTileIds.clone();
|
||||
section.objectXs = (short[])objectXs.clone();
|
||||
section.objectYs = (short[])objectYs.clone();
|
||||
section.objectInfo = (ObjectInfo[])objectInfo.clone();
|
||||
section.baseTileIds = baseTileIds.clone();
|
||||
section.objectTileIds = objectTileIds.clone();
|
||||
section.objectXs = objectXs.clone();
|
||||
section.objectYs = objectYs.clone();
|
||||
section.objectInfo = objectInfo.clone();
|
||||
return section;
|
||||
} catch (CloneNotSupportedException cnse) {
|
||||
throw new RuntimeException(cnse);
|
||||
|
||||
Reference in New Issue
Block a user