From 33737ea2dcd97026706dd75f8c2c27fa148c165a Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Thu, 1 Sep 2016 19:10:36 -0400 Subject: TITANIC: Convert many static_casts to dynamic_cast --- engines/titanic/pet_control/pet_remote_glyphs.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engines/titanic/pet_control/pet_remote_glyphs.cpp') diff --git a/engines/titanic/pet_control/pet_remote_glyphs.cpp b/engines/titanic/pet_control/pet_remote_glyphs.cpp index 6b7c8cb4ae..35a7ab39ac 100644 --- a/engines/titanic/pet_control/pet_remote_glyphs.cpp +++ b/engines/titanic/pet_control/pet_remote_glyphs.cpp @@ -29,7 +29,7 @@ namespace Titanic { CPetRemote *CPetRemoteGlyphs::getOwner() const { - return static_cast(_owner); + return dynamic_cast(_owner); } void CPetRemoteGlyphs::generateMessage(RemoteMessage msgNum, const CString &name, int num) { @@ -44,11 +44,11 @@ void CPetRemoteGlyph::setDefaults(const CString &name, CPetControl *petControl) } CPetRemoteGlyphs *CPetRemoteGlyph::getOwner() const { - return static_cast(_owner); + return dynamic_cast(_owner); } CPetGfxElement *CPetRemoteGlyph::getElement(uint id) const { - CPetRemote *remote = static_cast(_owner->getOwner()); + CPetRemote *remote = dynamic_cast(_owner->getOwner()); return remote->getElement(id); } -- cgit v1.2.3