diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-09-20 23:23:41 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-09-20 23:23:41 +0000 |
commit | 747e0eae09c7af9ce7d4acb5af9f059d9d2495a9 (patch) | |
tree | eef4e24df67d5658cca92b9912089df9b7ffa45b /crawl-ref/source/monstuff.cc | |
parent | c0fe02b91def8782f6f4d2cb054c05228880432a (diff) | |
download | crawl-ref-747e0eae09c7af9ce7d4acb5af9f059d9d2495a9.tar.gz crawl-ref-747e0eae09c7af9ce7d4acb5af9f059d9d2495a9.zip |
Remove some unnecessary casts.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6958 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monstuff.cc')
-rw-r--r-- | crawl-ref/source/monstuff.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index 07b1040006..3beb84676d 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -733,13 +733,13 @@ static void _mummy_curse(monsters* monster, killer_type killer, int index) actor* target; if (index == NON_MONSTER) - target = dynamic_cast<actor*>(&you); + target = &you; else { // Mummies committing suicide don't cause a death curse. - if (index == (int) monster_index(monster)) + if (index == static_cast<int>(monster_index(monster))) return; - target = dynamic_cast<actor*>(&menv[index]); + target = &menv[index]; } // Mummy was killed by a giant spore or ball lightning? @@ -6952,9 +6952,8 @@ static bool _monster_move(monsters *monster) if (target_grid == DNGN_DEEP_WATER) deep_water_available = true; - const monsters* mons = dynamic_cast<const monsters*>(monster); good_move[count_x][count_y] = - _mon_can_move_to_pos(mons, coord_def(count_x-1, count_y-1)); + _mon_can_move_to_pos(monster, coord_def(count_x-1, count_y-1)); } // Now we know where we _can_ move. |