diff options
author | Paul Gilbert | 2016-09-05 10:06:21 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-09-05 10:06:21 -0400 |
commit | 610aab1c635f170348179ac5a2ecccc6971874f8 (patch) | |
tree | 08f4e5a698c1666ba171fdf61a20717460f16610 /engines/titanic/pet_control | |
parent | f5ce9c167cd6e16b26e0510dd0d1b19881d86a73 (diff) | |
download | scummvm-rg350-610aab1c635f170348179ac5a2ecccc6971874f8.tar.gz scummvm-rg350-610aab1c635f170348179ac5a2ecccc6971874f8.tar.bz2 scummvm-rg350-610aab1c635f170348179ac5a2ecccc6971874f8.zip |
TITANIC: Convert some dynamic_casts back to static_cast as appropriate
Diffstat (limited to 'engines/titanic/pet_control')
4 files changed, 7 insertions, 7 deletions
diff --git a/engines/titanic/pet_control/pet_inventory_glyphs.cpp b/engines/titanic/pet_control/pet_inventory_glyphs.cpp index 38974547f5..03293eb453 100644 --- a/engines/titanic/pet_control/pet_inventory_glyphs.cpp +++ b/engines/titanic/pet_control/pet_inventory_glyphs.cpp @@ -203,8 +203,8 @@ void CPetInventoryGlyph::setItem(CGameObject *item, bool isLoading) { if (_owner && item) { int v1 = populateItem(item, isLoading); - _background = dynamic_cast<CPetInventoryGlyphs *>(_owner)->getBackground(v1); - _image = dynamic_cast<CPetInventory *>(getPetSection())->getImage(v1); + _background = static_cast<CPetInventoryGlyphs *>(_owner)->getBackground(v1); + _image = static_cast<CPetInventory *>(getPetSection())->getImage(v1); } } diff --git a/engines/titanic/pet_control/pet_remote_glyphs.cpp b/engines/titanic/pet_control/pet_remote_glyphs.cpp index 35a7ab39ac..953428ff0c 100644 --- a/engines/titanic/pet_control/pet_remote_glyphs.cpp +++ b/engines/titanic/pet_control/pet_remote_glyphs.cpp @@ -48,7 +48,7 @@ CPetRemoteGlyphs *CPetRemoteGlyph::getOwner() const { } CPetGfxElement *CPetRemoteGlyph::getElement(uint id) const { - CPetRemote *remote = dynamic_cast<CPetRemote *>(_owner->getOwner()); + CPetRemote *remote = static_cast<CPetRemote *>(_owner->getOwner()); return remote->getElement(id); } diff --git a/engines/titanic/pet_control/pet_rooms.cpp b/engines/titanic/pet_control/pet_rooms.cpp index 2ec66b08e2..fb92f2692d 100644 --- a/engines/titanic/pet_control/pet_rooms.cpp +++ b/engines/titanic/pet_control/pet_rooms.cpp @@ -340,7 +340,7 @@ bool CPetRooms::changeLocationClass(int newClassNum) { bool CPetRooms::hasRoomFlags(uint roomFlags) const { for (CPetRoomsGlyphs::const_iterator i = _glyphs.begin(); i != _glyphs.end(); ++i) { - const CPetRoomsGlyph *glyph = dynamic_cast<const CPetRoomsGlyph *>(*i); + const CPetRoomsGlyph *glyph = static_cast<const CPetRoomsGlyph *>(*i); if (glyph->isAssigned() && glyph->getRoomFlags() == roomFlags) return true; } diff --git a/engines/titanic/pet_control/pet_rooms_glyphs.cpp b/engines/titanic/pet_control/pet_rooms_glyphs.cpp index d7ac634f5d..e89e8072dc 100644 --- a/engines/titanic/pet_control/pet_rooms_glyphs.cpp +++ b/engines/titanic/pet_control/pet_rooms_glyphs.cpp @@ -141,7 +141,7 @@ bool CPetRoomsGlyph::dragGlyph(const Point &topLeft, CMouseDragStartMsg *msg) { void CPetRoomsGlyph::getTooltip(CPetText *text) { CRoomFlags roomFlags(_roomFlags); - CPetRooms *owner = dynamic_cast<CPetRooms *>(getPetSection()); + CPetRooms *owner = static_cast<CPetRooms *>(getPetSection()); CString msg; if (isCurrentlyAssigned()) { @@ -172,7 +172,7 @@ void CPetRoomsGlyph::saveGlyph(SimpleFile *file, int indent) { } bool CPetRoomsGlyph::proc33(CPetGlyph *glyph) { - CPetRoomsGlyph *roomGlyph = dynamic_cast<CPetRoomsGlyph *>(glyph); + CPetRoomsGlyph *roomGlyph = static_cast<CPetRoomsGlyph *>(glyph); return CPetGlyph::proc33(glyph) && _roomFlags == roomGlyph->_roomFlags; } @@ -246,7 +246,7 @@ CPetRoomsGlyph *CPetRoomsGlyphs::findAssignedRoom() const { CPetRoomsGlyph *CPetRoomsGlyphs::findGlyphByFlags(uint flags) const { for (const_iterator i = begin(); i != end(); ++i) { - CPetRoomsGlyph *glyph = dynamic_cast<CPetRoomsGlyph *>(*i); + CPetRoomsGlyph *glyph = static_cast<CPetRoomsGlyph *>(*i); if (glyph->getRoomFlags() == flags) return glyph; } |