From ebfdac231c1e430d54874f03db01a80e4af39cc2 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 11 Oct 2006 23:50:41 +0000 Subject: [PATCH] simplify; use dynamic_cast (dynamic_cast is safe as long as it's used only on pointer values; do not use it on reference types, since that can throw) --- stepmania/src/ComboGraph.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stepmania/src/ComboGraph.cpp b/stepmania/src/ComboGraph.cpp index 597acf4880..ed94486524 100644 --- a/stepmania/src/ComboGraph.cpp +++ b/stepmania/src/ComboGraph.cpp @@ -26,7 +26,7 @@ void ComboGraph::LoadFromNode( const XNode* pNode ) m_pMaxComboText = (BitmapText *) this->GetChild( "MaxComboText" ); if( m_pMaxComboText == NULL ) RageException::Throw( "%s: ComboGraph: must have a child named \"MaxComboText\"", ActorUtil::GetWhere(pNode).c_str() ); - if( !m_pMaxComboText->IsType("BitmapText") ) + if( dynamic_cast(m_pMaxComboText) == NULL ) RageException::Throw( "%s: ComboGraph: \"MaxComboText\" child is not a BitmapText", ActorUtil::GetWhere(pNode).c_str() ); m_pNormalCombo = this->GetChild( "NormalCombo" );