From: Thomas Geymayer Date: Thu, 15 Nov 2012 21:17:43 +0000 (+0100) Subject: Fix compile errors for old gcc X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a0535ef64dd42c9ec1ba19402b4a316972860f85;p=simgear.git Fix compile errors for old gcc --- diff --git a/simgear/nasal/cppbind/Ghost.hxx b/simgear/nasal/cppbind/Ghost.hxx index c679f644..300db250 100644 --- a/simgear/nasal/cppbind/Ghost.hxx +++ b/simgear/nasal/cppbind/Ghost.hxx @@ -517,19 +517,19 @@ namespace nasal // this ghost wraps. if( !boost::is_same < typename BaseGhost::raw_type, - Ghost::raw_type + typename Ghost::raw_type >::value && dynamic_cast(base) != base ) return 0; // Now check if we can further downcast to one of our derived classes. - naGhostType* ghost_type = 0; for( typename DerivedList::reverse_iterator derived = getSingletonPtr()->_derived_classes.rbegin(); derived != getSingletonPtr()->_derived_classes.rend(); ++derived ) { - ghost_type = (*derived)( static_cast(base) ); + naGhostType* ghost_type = + (*derived)( static_cast(base) ); if( ghost_type ) return ghost_type; }