]> git.mxchange.org Git - simgear.git/commitdiff
Now the real fix for old compilers...
authorThomas Geymayer <tomgey@gmail.com>
Wed, 4 Jun 2014 01:16:02 +0000 (03:16 +0200)
committerThomas Geymayer <tomgey@gmail.com>
Wed, 4 Jun 2014 01:16:02 +0000 (03:16 +0200)
simgear/nasal/cppbind/Ghost.hxx

index f16ea20c8765a503a02a0693486d77bd6e636a25..deb3ed2cadb462085a3a6dec454069c06f2bac66 100644 (file)
@@ -1168,13 +1168,18 @@ namespace nasal
           SG_GET_TEMPLATE_MEMBER(Ghost, destroy<weak_ref>);
         _ghost_type_weak.name = _name_weak.c_str();
 
-        bool can_weak = supports_weak_ref<T>::value;
-        _ghost_type_weak.get_member = can_weak
-          ? SG_GET_TEMPLATE_MEMBER(Ghost, getMember<true>)
-          : 0;
-        _ghost_type_weak.set_member = can_weak
-          ? SG_GET_TEMPLATE_MEMBER(Ghost, setMember<true>)
-          : 0;
+        if( supports_weak_ref<T>::value )
+        {
+          _ghost_type_weak.get_member =
+            SG_GET_TEMPLATE_MEMBER(Ghost, getMember<true>);
+          _ghost_type_weak.set_member =
+            SG_GET_TEMPLATE_MEMBER(Ghost, setMember<true>);
+        }
+        else
+        {
+          _ghost_type_weak.get_member = 0;
+          _ghost_type_weak.set_member = 0;
+        }
       }
 
       static GhostPtr& getSingletonHolder()