]> git.mxchange.org Git - simgear.git/commitdiff
Fix compile errors for old gcc
authorThomas Geymayer <tomgey@gmail.com>
Thu, 15 Nov 2012 21:17:43 +0000 (22:17 +0100)
committerThomas Geymayer <tomgey@gmail.com>
Thu, 15 Nov 2012 21:17:43 +0000 (22:17 +0100)
simgear/nasal/cppbind/Ghost.hxx

index c679f6440c69a244f532dbce68e4450c3675ff64..300db25047b476d7299fbbe85f2a8dc613225814 100644 (file)
@@ -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<const Ghost::raw_type*>(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<const Ghost::raw_type*>(base) );
+          naGhostType* ghost_type =
+            (*derived)( static_cast<const typename Ghost::raw_type*>(base) );
           if( ghost_type )
             return ghost_type;
         }