removed the need for RTTI/runtime type checking/dynamic_cast in glui. It is unnecessary to overhaul the build systems just for this feature. Replaced by upcasting virtual methods
if ( !dynamic_cast<GLUI_Rollout*>(this) && becomes if ( !this->dynamicCastGLUI_Rollout() && etc.
This commit is contained in:
@@ -1092,7 +1092,7 @@ int GLUI_TextBox::mouse_over( int state, int x, int y )
|
||||
}
|
||||
|
||||
void GLUI_TextBox::scrollbar_callback(GLUI_Control *my_scrollbar) {
|
||||
GLUI_Scrollbar *sb = dynamic_cast<GLUI_Scrollbar*>(my_scrollbar);
|
||||
GLUI_Scrollbar *sb = my_scrollbar->dynamicCastGLUI_Scrollbar();
|
||||
if (!sb) return;
|
||||
GLUI_TextBox* me = (GLUI_TextBox*) sb->associated_object;
|
||||
if (me->scrollbar == NULL)
|
||||
|
||||
Reference in New Issue
Block a user