Changing the name of clone() just so we can change the return type is
Kormanian wackiness. Let's just make clone() public and use it like civilized people. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3163 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: GameConfig.java,v 1.19 2004/10/22 17:50:03 andrzej Exp $
|
// $Id: GameConfig.java,v 1.20 2004/10/22 18:50:51 mdb Exp $
|
||||||
//
|
//
|
||||||
// Narya library - tools for developing networked games
|
// Narya library - tools for developing networked games
|
||||||
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
||||||
@@ -98,16 +98,13 @@ public abstract class GameConfig extends PlaceConfig implements Cloneable
|
|||||||
return getClass().hashCode() + (rated ? 1 : 0);
|
return getClass().hashCode() + (rated ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
// documentation inherited
|
||||||
* Returns a clone of this game config.
|
public Object clone ()
|
||||||
*/
|
|
||||||
public GameConfig getClone ()
|
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
return (GameConfig)clone();
|
return super.clone();
|
||||||
} catch (CloneNotSupportedException cnse) {
|
} catch (CloneNotSupportedException cnse) {
|
||||||
// something has gone horribly awry
|
throw new RuntimeException("clone() failed: " + cnse);
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user