More type jockeying.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@704 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
@@ -163,7 +163,8 @@ public final class StatSet extends DSet<Stat>
|
|||||||
{
|
{
|
||||||
@SuppressWarnings("unchecked") SetStat<T> stat = (SetStat<T>)getStat(type);
|
@SuppressWarnings("unchecked") SetStat<T> stat = (SetStat<T>)getStat(type);
|
||||||
if (stat == null) {
|
if (stat == null) {
|
||||||
stat = (SetStat<T>)type.newStat();
|
@SuppressWarnings("unchecked") SetStat<T> nstat = (SetStat<T>)type.newStat();
|
||||||
|
stat = nstat;
|
||||||
stat.add(value);
|
stat.add(value);
|
||||||
addStat(stat);
|
addStat(stat);
|
||||||
} else if (stat.add(value)) {
|
} else if (stat.add(value)) {
|
||||||
@@ -234,7 +235,7 @@ public final class StatSet extends DSet<Stat>
|
|||||||
*/
|
*/
|
||||||
public int getSetStatSize (Stat.Type type)
|
public int getSetStatSize (Stat.Type type)
|
||||||
{
|
{
|
||||||
@SuppressWarnings("unchecked") SetStat stat = (SetStat)getStat(type);
|
SetStat<?> stat = (SetStat<?>)getStat(type);
|
||||||
return (stat == null ? 0 : stat.size());
|
return (stat == null ? 0 : stat.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user