From ead953898d06faa75c6f5cffae6dd284c19db83a Mon Sep 17 00:00:00 2001 From: mgueydan Date: Sun, 8 Sep 2013 12:37:14 +0200 Subject: replacing C-style cast by dynamic_cast --- source/Chunk.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/Chunk.cpp') diff --git a/source/Chunk.cpp b/source/Chunk.cpp index 0d6ce335d..00010e806 100644 --- a/source/Chunk.cpp +++ b/source/Chunk.cpp @@ -451,7 +451,7 @@ void cChunk::CollectMobCensus(cMobCensus& toFill) { try { - cMonster& Monster = (cMonster&)(**itr); + cMonster& Monster = dynamic_cast(**itr); currentPosition = Monster.GetPosition(); for (std::list::const_iterator itr2 = playerPositions.begin(); itr2 != playerPositions.end(); itr2 ++) { -- cgit v1.2.3