diff options
author | Paul Gilbert | 2016-09-01 19:10:36 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-09-01 19:10:36 -0400 |
commit | 33737ea2dcd97026706dd75f8c2c27fa148c165a (patch) | |
tree | 29784cf3e7c9270b02a67f0fe02829d3bab9bbd2 /engines/titanic/pet_control/pet_rooms_glyphs.cpp | |
parent | ac740c8e39113f0cd50def490dba1c6d51e07e99 (diff) | |
download | scummvm-rg350-33737ea2dcd97026706dd75f8c2c27fa148c165a.tar.gz scummvm-rg350-33737ea2dcd97026706dd75f8c2c27fa148c165a.tar.bz2 scummvm-rg350-33737ea2dcd97026706dd75f8c2c27fa148c165a.zip |
TITANIC: Convert many static_casts to dynamic_cast
Diffstat (limited to 'engines/titanic/pet_control/pet_rooms_glyphs.cpp')
-rw-r--r-- | engines/titanic/pet_control/pet_rooms_glyphs.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/titanic/pet_control/pet_rooms_glyphs.cpp b/engines/titanic/pet_control/pet_rooms_glyphs.cpp index d9e19b1f67..d7ac634f5d 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 = static_cast<CPetRooms *>(getPetSection()); + CPetRooms *owner = dynamic_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 = static_cast<CPetRoomsGlyph *>(glyph); + CPetRoomsGlyph *roomGlyph = dynamic_cast<CPetRoomsGlyph *>(glyph); return CPetGlyph::proc33(glyph) && _roomFlags == roomGlyph->_roomFlags; } @@ -236,7 +236,7 @@ void CPetRoomsGlyphs::saveGlyphs(SimpleFile *file, int indent) { CPetRoomsGlyph *CPetRoomsGlyphs::findAssignedRoom() const { for (const_iterator i = begin(); i != end(); ++i) { - CPetRoomsGlyph *glyph = static_cast<CPetRoomsGlyph *>(*i); + CPetRoomsGlyph *glyph = dynamic_cast<CPetRoomsGlyph *>(*i); if (glyph->isCurrentlyAssigned()) return glyph; } @@ -246,7 +246,7 @@ CPetRoomsGlyph *CPetRoomsGlyphs::findAssignedRoom() const { CPetRoomsGlyph *CPetRoomsGlyphs::findGlyphByFlags(uint flags) const { for (const_iterator i = begin(); i != end(); ++i) { - CPetRoomsGlyph *glyph = static_cast<CPetRoomsGlyph *>(*i); + CPetRoomsGlyph *glyph = dynamic_cast<CPetRoomsGlyph *>(*i); if (glyph->getRoomFlags() == flags) return glyph; } |