diff options
author | tycho <work.tycho@gmail.com> | 2015-05-24 13:56:56 +0200 |
---|---|---|
committer | tycho <work.tycho@gmail.com> | 2015-05-24 13:56:56 +0200 |
commit | dae9e5792a4f030ae9e748548a16a89790fbd311 (patch) | |
tree | 2142b8c4deb9f2c7ad096b8b0ec93fefccd8d8f1 /src/Generating/PrefabPiecePool.cpp | |
parent | Merge branch 'master' into PreventNewWarnings (diff) | |
download | cuberite-dae9e5792a4f030ae9e748548a16a89790fbd311.tar cuberite-dae9e5792a4f030ae9e748548a16a89790fbd311.tar.gz cuberite-dae9e5792a4f030ae9e748548a16a89790fbd311.tar.bz2 cuberite-dae9e5792a4f030ae9e748548a16a89790fbd311.tar.lz cuberite-dae9e5792a4f030ae9e748548a16a89790fbd311.tar.xz cuberite-dae9e5792a4f030ae9e748548a16a89790fbd311.tar.zst cuberite-dae9e5792a4f030ae9e748548a16a89790fbd311.zip |
Diffstat (limited to 'src/Generating/PrefabPiecePool.cpp')
-rw-r--r-- | src/Generating/PrefabPiecePool.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Generating/PrefabPiecePool.cpp b/src/Generating/PrefabPiecePool.cpp index 895555ef8..e4df8efa8 100644 --- a/src/Generating/PrefabPiecePool.cpp +++ b/src/Generating/PrefabPiecePool.cpp @@ -85,7 +85,7 @@ void cPrefabPiecePool::AddStartingPieceDefs(const cPrefab::sDef * a_StartingPiec void cPrefabPiecePool::AddToPerConnectorMap(cPrefab * a_Prefab) { - cPiece::cConnectors Connectors = ((const cPiece *)a_Prefab)->GetConnectors(); + cPiece::cConnectors Connectors = (static_cast<const cPiece *>(a_Prefab))->GetConnectors(); for (cPiece::cConnectors::const_iterator itr = Connectors.begin(), end = Connectors.end(); itr != end; ++itr) { m_PiecesByConnector[itr->m_Type].push_back(a_Prefab); @@ -122,7 +122,7 @@ cPieces cPrefabPiecePool::GetStartingPieces(void) int cPrefabPiecePool::GetPieceWeight(const cPlacedPiece & a_PlacedPiece, const cPiece::cConnector & a_ExistingConnector, const cPiece & a_NewPiece) { - return ((const cPrefab &)a_NewPiece).GetPieceWeight(a_PlacedPiece, a_ExistingConnector); + return (static_cast<const cPrefab &>(a_NewPiece)).GetPieceWeight(a_PlacedPiece, a_ExistingConnector); } @@ -131,7 +131,7 @@ int cPrefabPiecePool::GetPieceWeight(const cPlacedPiece & a_PlacedPiece, const c int cPrefabPiecePool::GetStartingPieceWeight(const cPiece & a_NewPiece) { - return ((const cPrefab &)a_NewPiece).GetDefaultWeight(); + return (static_cast<const cPrefab &>(a_NewPiece)).GetDefaultWeight(); } |