From d8367eeb6fd9a00838a2c1fbbc902c769c628965 Mon Sep 17 00:00:00 2001 From: Dave Hoover Date: Tue, 15 Jan 2008 21:32:59 +0000 Subject: [PATCH] Quick smattering of type safety to go along with other misc cleanup I've got in progress over in yohoho. git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@395 ed5b42cb-e716-0410-a449-f6a68f950b19 --- .../threerings/miso/data/SparseMisoSceneModel.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/java/com/threerings/miso/data/SparseMisoSceneModel.java b/src/java/com/threerings/miso/data/SparseMisoSceneModel.java index fc6506ae..b9196036 100644 --- a/src/java/com/threerings/miso/data/SparseMisoSceneModel.java +++ b/src/java/com/threerings/miso/data/SparseMisoSceneModel.java @@ -411,7 +411,7 @@ public class SparseMisoSceneModel extends MisoSceneModel * Don't call this method! This is only public so that the scene * writer can generate XML from the raw scene data. */ - public Iterator getSections () + public Iterator
getSections () { return _sections.values().iterator(); } @@ -438,7 +438,7 @@ public class SparseMisoSceneModel extends MisoSceneModel protected final Section getSection (int x, int y, boolean create) { int key = key(x, y); - Section sect = (Section)_sections.get(key); + Section sect = _sections.get(key); if (sect == null && create) { short sx = (short)(MathUtil.floorDiv(x, swidth)*swidth); short sy = (short)(MathUtil.floorDiv(y, sheight)*sheight); @@ -452,14 +452,14 @@ public class SparseMisoSceneModel extends MisoSceneModel public Object clone () { SparseMisoSceneModel model = (SparseMisoSceneModel)super.clone(); - model._sections = new StreamableHashIntMap(); - for (Iterator iter = getSections(); iter.hasNext(); ) { - Section sect = (Section)iter.next(); + model._sections = new StreamableHashIntMap
(); + for (Iterator
iter = getSections(); iter.hasNext(); ) { + Section sect = iter.next(); model.setSection((Section)sect.clone()); } return model; } /** Contains our sections in row major order. */ - protected StreamableHashIntMap _sections = new StreamableHashIntMap(); + protected StreamableHashIntMap
_sections = new StreamableHashIntMap
(); }